mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-09-19 18:32:47 +03:00
Change strange spacing on HTML unparse
This commit is contained in:
parent
82194f0fab
commit
49d1b07329
|
@ -144,11 +144,12 @@ def unparse(text, entities):
|
|||
html.append('<code>{}</code>'.format(entity_text))
|
||||
elif entity_type == MessageEntityPre:
|
||||
if entity.language:
|
||||
html.append("""<pre>
|
||||
<code class='language-{}'>
|
||||
{}
|
||||
</code>
|
||||
</pre>""".format(entity.language, entity_text))
|
||||
html.append(
|
||||
"<pre>\n"
|
||||
" <code class='language-{}'>\n"
|
||||
" {}\n"
|
||||
" </code>\n"
|
||||
"</pre>".format(entity.language, entity_text))
|
||||
else:
|
||||
html.append('<pre><code>{}</code></pre>'
|
||||
.format(entity_text))
|
||||
|
|
Loading…
Reference in New Issue
Block a user