refactor: add html_parser.py

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2025-03-10 15:16:00 +03:00
parent 3bbfb7b692
commit 25768e4c90
Signed by: mctaylors
GPG key ID: 4EEF4F949A266EE2
2 changed files with 22 additions and 6 deletions

14
html_parser.py Normal file
View file

@ -0,0 +1,14 @@
def bold(s: str) -> str:
return f"<b>{s}</b>"
def italic(s: str) -> str:
return f"<i>{s}</i>"
def strikethrough(s: str) -> str:
return f"<s>{s}</s>"
def hyperlink(s: str, href: str) -> str:
return f"<a href='{href}'>{s}</a>"
def code(s: str) -> str:
return f"<code>{s}</code>"