From 310ccc16fbfd520b3fd232f8d206c1c063db8d7c Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Sat, 24 Sep 2022 09:51:19 -0400 Subject: [PATCH] fix: allow HTML5 s tag through cleaner (#262) --- readme_renderer/clean.py | 2 +- tests/fixtures/test_rst_bibtex.html | 2 ++ tests/fixtures/test_rst_bibtex.rst | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 tests/fixtures/test_rst_bibtex.html create mode 100644 tests/fixtures/test_rst_bibtex.rst diff --git a/readme_renderer/clean.py b/readme_renderer/clean.py index 747bab8..386e684 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", "nav", + "tr", "tt", "kbd", "var", "input", "section", "aside", "nav", "s", ] ALLOWED_ATTRIBUTES = { diff --git a/tests/fixtures/test_rst_bibtex.html b/tests/fixtures/test_rst_bibtex.html new file mode 100644 index 0000000..4305801 --- /dev/null +++ b/tests/fixtures/test_rst_bibtex.html @@ -0,0 +1,2 @@ +
@article{the_impact_of_pygments_docutils_config_and_html5,
+  year = {2022},
diff --git a/tests/fixtures/test_rst_bibtex.rst b/tests/fixtures/test_rst_bibtex.rst new file mode 100644 index 0000000..a7642f4 --- /dev/null +++ b/tests/fixtures/test_rst_bibtex.rst @@ -0,0 +1,4 @@ +.. code:: bibtex + + @article{the_impact_of_pygments_docutils_config_and_html5, + year = {2022},