diff --git a/CHANGES.rst b/CHANGES.rst index 8ba9f69..a2ee3f9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,11 @@ Changes ======= +37.1 (2022-09-03) +----------------- + +* Allow HTML5 `nav` tag through cleaner (#259) + 37.0 (2022-08-21) ----------------- diff --git a/readme_renderer/__about__.py b/readme_renderer/__about__.py index c224c6b..9eca077 100644 --- a/readme_renderer/__about__.py +++ b/readme_renderer/__about__.py @@ -29,7 +29,7 @@ ) __uri__ = "https://github.com/pypa/readme_renderer" -__version__ = "37.0" +__version__ = "37.1" __author__ = "The Python Packaging Authority" __email__ = "admin@mail.pypi.org" diff --git a/readme_renderer/clean.py b/readme_renderer/clean.py index 9353e1f..747bab8 100644 --- a/readme_renderer/clean.py +++ b/readme_renderer/clean.py @@ -30,7 +30,7 @@ "br", "caption", "cite", "col", "colgroup", "dd", "del", "details", "div", "dl", "dt", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "img", "p", "pre", "span", "sub", "summary", "sup", "table", "tbody", "td", "th", "thead", - "tr", "tt", "kbd", "var", "input", "section", "aside", + "tr", "tt", "kbd", "var", "input", "section", "aside", "nav", ] ALLOWED_ATTRIBUTES = { @@ -63,6 +63,7 @@ "dl": ["class"], "dt": ["class"], "ul": ["class"], + "nav": ["class"], } diff --git a/tests/fixtures/test_rst_contents.html b/tests/fixtures/test_rst_contents.html new file mode 100644 index 0000000..48a5556 --- /dev/null +++ b/tests/fixtures/test_rst_contents.html @@ -0,0 +1,22 @@ + +
+

Features

+ +
+
+

Installation

+

Requirements

+ +

Let’s eat some cheese together!

+
diff --git a/tests/fixtures/test_rst_contents.rst b/tests/fixtures/test_rst_contents.rst new file mode 100644 index 0000000..13d77a5 --- /dev/null +++ b/tests/fixtures/test_rst_contents.rst @@ -0,0 +1,19 @@ +.. Tests that using a Table of Contents directive renders correctly + +.. contents:: + +Features +======== + +* Eats cheese + +Installation +============ + +Requirements +------------ + +* Teeth +* Good taste + +Let's eat some cheese together!