Skip to content

Commit

Permalink
Update test_markdown.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KurimuzonAkuma committed Nov 28, 2024
1 parent 6f55ac6 commit 8e5c740
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/parser/test_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,11 @@ def test_markdown_unparse_no_entities():
entities = []

assert Markdown.unparse(text=text, entities=entities) == expected

def test_markdown_unparse_html():
expected = "__This works, it's ok__ <b>This shouldn't</b>"
text = "This works, it's ok <b>This shouldn't</b>"
entities = pyrogram.types.List(
[pyrogram.types.MessageEntity(type=pyrogram.enums.MessageEntityType.ITALIC, offset=0, length=19)])

assert Markdown.unparse(text=text, entities=entities) == expected

0 comments on commit 8e5c740

Please sign in to comment.