Fix italic and underline decorations

This commit is contained in:
Alex Root Junior 2020-09-13 22:56:32 +03:00
parent 7d1c8c42d3
commit 84785e4880
2 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@ test:
tox
summary:
cloc aiogram/ tests/ examples/ setup.py
cloc aiogram/ tests/ examples/ docs/ setup.py
docs: docs/source/*
cd docs && $(MAKE) html

View file

@ -180,7 +180,7 @@ class MarkdownDecoration(TextDecoration):
return f"*{value}*"
def italic(self, value: str) -> str:
return f"_{value}_\r"
return f"_\r{value}_\r"
def code(self, value: str) -> str:
return f"`{value}`"
@ -192,7 +192,7 @@ class MarkdownDecoration(TextDecoration):
return f"```{language}\n{value}\n```"
def underline(self, value: str) -> str:
return f"__{value}__"
return f"__\r{value}__\r"
def strikethrough(self, value: str) -> str:
return f"~{value}~"