mirror of
https://github.com/markqvist/Sideband.git
synced 2025-07-20 21:48:58 -04:00
Improved message markup handling
This commit is contained in:
parent
3b8700c197
commit
fbb58eb7b9
3 changed files with 15 additions and 7 deletions
|
@ -656,7 +656,12 @@ class Messages():
|
|||
def cbf(w):
|
||||
def x(dt):
|
||||
if w.texture_size[0] == 0 and w.texture_size[1] == 0:
|
||||
w.text = "[i]This message could not be rendered, likely due to an error in its markup. Falling back to plain-text rendering.[/i]\n\n"+escape_markup(w.text)
|
||||
w.markup = False
|
||||
escaped_content = escape_markup(w.text)
|
||||
def deferred(dt):
|
||||
w.text = "[i]This message could not be rendered correctly, likely due to an error in its markup. Falling back to plain-text rendering.[/i]\n\n"+escaped_content
|
||||
w.markup = True
|
||||
Clock.schedule_once(deferred, 0.1)
|
||||
return x
|
||||
|
||||
Clock.schedule_once(cbf(item.ids.content_text), 0.25)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue