Skip to content

Commit

Permalink
Release 37.1 (pypa#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
miketheman authored Sep 3, 2022
1 parent c6a3c1c commit e662bf4
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changes
=======

37.1 (2022-09-03)
-----------------

* Allow HTML5 `nav` tag through cleaner (#259)

37.0 (2022-08-21)
-----------------

Expand Down
2 changes: 1 addition & 1 deletion readme_renderer/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion readme_renderer/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -63,6 +63,7 @@
"dl": ["class"],
"dt": ["class"],
"ul": ["class"],
"nav": ["class"],
}


Expand Down
22 changes: 22 additions & 0 deletions tests/fixtures/test_rst_contents.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<nav class="contents" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a href="#features" id="toc-entry-1" rel="nofollow">Features</a></p></li>
<li><p><a href="#installation" id="toc-entry-2" rel="nofollow">Installation</a></p></li>
</ul>
</nav>
<section id="features">
<h2><a href="#toc-entry-1" rel="nofollow">Features</a></h2>
<ul class="simple">
<li><p>Eats cheese</p></li>
</ul>
</section>
<section id="installation">
<h2><a href="#toc-entry-2" rel="nofollow">Installation</a></h2>
<p class="section-subtitle" id="requirements">Requirements</p>
<ul class="simple">
<li><p>Teeth</p></li>
<li><p>Good taste</p></li>
</ul>
<p>Let’s eat some cheese together!</p>
</section>
19 changes: 19 additions & 0 deletions tests/fixtures/test_rst_contents.rst
Original file line number Diff line number Diff line change
@@ -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!

0 comments on commit e662bf4

Please sign in to comment.