mirror of https://gitlab.com/bashrc2/epicyon
Handle emboldened text with quotes
parent
d0f6ddd296
commit
a1f2096900
14
content.py
14
content.py
|
@ -1342,10 +1342,20 @@ def bold_reading_string(text: str) -> str:
|
||||||
if len(wrd) > 1 and \
|
if len(wrd) > 1 and \
|
||||||
'<' not in wrd and '>' not in wrd and \
|
'<' not in wrd and '>' not in wrd and \
|
||||||
not wrd.startswith(':'):
|
not wrd.startswith(':'):
|
||||||
|
|
||||||
|
prefix = ''
|
||||||
|
postfix = ''
|
||||||
|
if wrd.startswith('"'):
|
||||||
|
prefix = '"'
|
||||||
|
wrd = wrd[1:]
|
||||||
|
if wrd.endswith('"'):
|
||||||
|
postfix = '"'
|
||||||
|
wrd = wrd[:len(wrd) - 1]
|
||||||
|
|
||||||
initial_chars = int(len(wrd) / 2)
|
initial_chars = int(len(wrd) / 2)
|
||||||
new_parag += \
|
new_parag += \
|
||||||
'<b>' + wrd[:initial_chars] + '</b>' + \
|
prefix + '<b>' + wrd[:initial_chars] + '</b>' + \
|
||||||
wrd[initial_chars:] + ' '
|
wrd[initial_chars:] + postfix + ' '
|
||||||
else:
|
else:
|
||||||
new_parag += wrd + ' '
|
new_parag += wrd + ' '
|
||||||
parag_ctr += 1
|
parag_ctr += 1
|
||||||
|
|
Loading…
Reference in New Issue