Skip to content

Commit bd65c07

Browse files
authored
allow figcaption in rst files (#291)
1 parent 9dbb352 commit bd65c07

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

readme_renderer/clean.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"dl", "dt", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "img", "p", "pre",
3232
"span", "sub", "summary", "sup", "table", "tbody", "td", "th", "thead",
3333
"tr", "tt", "kbd", "var", "input", "section", "aside", "nav", "s", "figure",
34+
"figcaption",
3435
]
3536

3637
ALLOWED_ATTRIBUTES = {

tests/fixtures/test_rst_figure.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
<figure class="align-center">
22
<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">
3+
<figcaption>
4+
<p>This is the caption for the figure</p>
5+
</figcaption>
36
</figure>

tests/fixtures/test_rst_figure.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.. figure:: https://raw.githubusercontent.com/schlatterbeck/plot-antenna/master/test/12-el-azimuth.png
22
:align: center
3+
4+
This is the caption for the figure

0 commit comments

Comments
 (0)