Skip to content

Commit

Permalink
Use HTML entities for emojis img alts instead of raw unicode (was not…
Browse files Browse the repository at this point in the history
… OS agnostic)
  • Loading branch information
Tina-otoge committed Apr 27, 2024
1 parent 4798afd commit 45a9c10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/03-emojis/output/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p>I <img alt="" class="emoji" src="https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.0.3/assets/72x72/2764.png" title=":heart:"> you!</p>
<p>I <img alt="&#x2764;" class="emoji" src="https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.0.3/assets/72x72/2764.png" title=":heart:"> you!</p>
1 change: 1 addition & 0 deletions src/sssimp/generators/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def markdown_to_html(text):
extension_configs={
"smarty": {"smart_angled_quotes": True},
"pymdownx.emoji": {
"alt": "html_entity",
"emoji_index": pymdownx.emoji.twemoji,
"options": {"classes": "emoji"},
},
Expand Down

0 comments on commit 45a9c10

Please sign in to comment.