Skip to content

Commit e662bf4

Browse files
authored
Release 37.1 (#259)
1 parent c6a3c1c commit e662bf4

File tree

5 files changed

+49
-2
lines changed

5 files changed

+49
-2
lines changed

CHANGES.rst

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changes
22
=======
33

4+
37.1 (2022-09-03)
5+
-----------------
6+
7+
* Allow HTML5 `nav` tag through cleaner (#259)
8+
49
37.0 (2022-08-21)
510
-----------------
611

readme_renderer/__about__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
)
3030
__uri__ = "https://github.com/pypa/readme_renderer"
3131

32-
__version__ = "37.0"
32+
__version__ = "37.1"
3333

3434
__author__ = "The Python Packaging Authority"
3535
__email__ = "[email protected]"

readme_renderer/clean.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"br", "caption", "cite", "col", "colgroup", "dd", "del", "details", "div",
3131
"dl", "dt", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "img", "p", "pre",
3232
"span", "sub", "summary", "sup", "table", "tbody", "td", "th", "thead",
33-
"tr", "tt", "kbd", "var", "input", "section", "aside",
33+
"tr", "tt", "kbd", "var", "input", "section", "aside", "nav",
3434
]
3535

3636
ALLOWED_ATTRIBUTES = {
@@ -63,6 +63,7 @@
6363
"dl": ["class"],
6464
"dt": ["class"],
6565
"ul": ["class"],
66+
"nav": ["class"],
6667
}
6768

6869

tests/fixtures/test_rst_contents.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<nav class="contents" id="contents">
2+
<p class="topic-title">Contents</p>
3+
<ul class="simple">
4+
<li><p><a href="#features" id="toc-entry-1" rel="nofollow">Features</a></p></li>
5+
<li><p><a href="#installation" id="toc-entry-2" rel="nofollow">Installation</a></p></li>
6+
</ul>
7+
</nav>
8+
<section id="features">
9+
<h2><a href="#toc-entry-1" rel="nofollow">Features</a></h2>
10+
<ul class="simple">
11+
<li><p>Eats cheese</p></li>
12+
</ul>
13+
</section>
14+
<section id="installation">
15+
<h2><a href="#toc-entry-2" rel="nofollow">Installation</a></h2>
16+
<p class="section-subtitle" id="requirements">Requirements</p>
17+
<ul class="simple">
18+
<li><p>Teeth</p></li>
19+
<li><p>Good taste</p></li>
20+
</ul>
21+
<p>Let’s eat some cheese together!</p>
22+
</section>

tests/fixtures/test_rst_contents.rst

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. Tests that using a Table of Contents directive renders correctly
2+
3+
.. contents::
4+
5+
Features
6+
========
7+
8+
* Eats cheese
9+
10+
Installation
11+
============
12+
13+
Requirements
14+
------------
15+
16+
* Teeth
17+
* Good taste
18+
19+
Let's eat some cheese together!

0 commit comments

Comments
 (0)