Skip to content

Commit ac2baee

Browse files
authored
allow picture through (#299)
1 parent 9c2eb81 commit ac2baee

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

readme_renderer/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def main(cli_args: Optional[List[str]] = None) -> None:
2828

2929
# Infer the format of the description from package metadata.
3030
if not content_format:
31-
content_type = message.get("Description-Content-Type", "text/x-rst") # type: ignore[attr-defined] # noqa: E501 https://github.com/python/typeshed/issues/10021
31+
content_type = message.get("Description-Content-Type", "text/x-rst")
3232
if content_type == "text/x-rst":
3333
content_format = "rst"
3434
elif content_type == "text/markdown":

readme_renderer/clean.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"dl", "dt", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "img", "p", "pre",
2828
"span", "sub", "summary", "sup", "table", "tbody", "td", "th", "thead",
2929
"tr", "tt", "kbd", "var", "input", "section", "aside", "nav", "s", "figure",
30-
"figcaption",
30+
"figcaption", "picture",
3131
}
3232

3333
ALLOWED_ATTRIBUTES = {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<picture>
2+
<img src="/media/cc0-images/painted-hand-298-332.jpg" alt="">
3+
</picture>

tests/fixtures/test_GFM_picture.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<picture>
2+
<img src="/media/cc0-images/painted-hand-298-332.jpg" alt="" />
3+
</picture>

0 commit comments

Comments
 (0)