mirror of
https://github.com/markqvist/Sideband.git
synced 2025-05-06 00:14:56 -04:00
Added detection of failed markup rendering, and plaintext fallback
This commit is contained in:
parent
ad58ab335a
commit
b2a5b8c193
2 changed files with 12 additions and 4 deletions
|
@ -45,10 +45,6 @@ def strip_emojis(str_input):
|
|||
return output
|
||||
|
||||
def multilingual_markup(data):
|
||||
# TODO: Remove
|
||||
# import time
|
||||
# ts = time.time()
|
||||
|
||||
do = ""
|
||||
rfont = "default"
|
||||
ds = data.decode("utf-8")
|
||||
|
@ -95,6 +91,10 @@ def multilingual_markup(data):
|
|||
|
||||
return do.encode("utf-8")
|
||||
|
||||
font_map = {
|
||||
"mono": "RobotoMono-Regular"
|
||||
}
|
||||
|
||||
codepoint_map = {
|
||||
0x0590: [0x05ff, "hebrew"],
|
||||
0x2e3a: [0x2e3b, "chinese"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue