Skip to content

Commit

Permalink
allow figcaption in rst files (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistwire authored Aug 18, 2023
1 parent 9dbb352 commit bd65c07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions readme_renderer/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"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", "s", "figure",
"figcaption",
]

ALLOWED_ATTRIBUTES = {
Expand Down
3 changes: 3 additions & 0 deletions tests/fixtures/test_rst_figure.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<figure class="align-center">
<img alt="https://raw.githubusercontent.com/schlatterbeck/plot-antenna/master/test/12-el-azimuth.png" src="https://raw.githubusercontent.com/schlatterbeck/plot-antenna/master/test/12-el-azimuth.png">
<figcaption>
<p>This is the caption for the figure</p>
</figcaption>
</figure>
2 changes: 2 additions & 0 deletions tests/fixtures/test_rst_figure.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.. figure:: https://raw.githubusercontent.com/schlatterbeck/plot-antenna/master/test/12-el-azimuth.png
:align: center

This is the caption for the figure

0 comments on commit bd65c07

Please sign in to comment.