Skip to content

Commit

Permalink
allow picture through (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistwire committed Jan 22, 2024
1 parent 9c2eb81 commit ac2baee
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion readme_renderer/__main__.py
Expand Up @@ -28,7 +28,7 @@ def main(cli_args: Optional[List[str]] = None) -> None:

# Infer the format of the description from package metadata.
if not content_format:
content_type = message.get("Description-Content-Type", "text/x-rst") # type: ignore[attr-defined] # noqa: E501 https://github.com/python/typeshed/issues/10021
content_type = message.get("Description-Content-Type", "text/x-rst")
if content_type == "text/x-rst":
content_format = "rst"
elif content_type == "text/markdown":
Expand Down
2 changes: 1 addition & 1 deletion readme_renderer/clean.py
Expand Up @@ -27,7 +27,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",
"figcaption", "picture",
}

ALLOWED_ATTRIBUTES = {
Expand Down
3 changes: 3 additions & 0 deletions tests/fixtures/test_GFM_picture.html
@@ -0,0 +1,3 @@
<picture>
<img src="/media/cc0-images/painted-hand-298-332.jpg" alt="">
</picture>
3 changes: 3 additions & 0 deletions tests/fixtures/test_GFM_picture.md
@@ -0,0 +1,3 @@
<picture>
<img src="/media/cc0-images/painted-hand-298-332.jpg" alt="" />
</picture>

0 comments on commit ac2baee

Please sign in to comment.