refactor: add html_parser.py
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
3bbfb7b692
commit
25768e4c90
2 changed files with 22 additions and 6 deletions
14
html_parser.py
Normal file
14
html_parser.py
Normal 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>"
|
Loading…
Add table
Add a link
Reference in a new issue