mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-01-30 13:53:13 +01:00
Unescape backslashes in html_output (#6648)
This commit is contained in:
parent
1b9121e5b8
commit
f1797f4323
@ -239,6 +239,9 @@ def convert_to_markdown(string):
|
|||||||
pattern = re.compile(r'<code[^>]*>(.*?)</code>', re.DOTALL)
|
pattern = re.compile(r'<code[^>]*>(.*?)</code>', re.DOTALL)
|
||||||
html_output = pattern.sub(lambda x: html.unescape(x.group()), html_output)
|
html_output = pattern.sub(lambda x: html.unescape(x.group()), html_output)
|
||||||
|
|
||||||
|
# Unescape backslashes
|
||||||
|
html_output = html_output.replace('\\\\', '\\')
|
||||||
|
|
||||||
# Add "long-list" class to <ul> or <ol> containing a long <li> item
|
# Add "long-list" class to <ul> or <ol> containing a long <li> item
|
||||||
html_output = add_long_list_class(html_output)
|
html_output = add_long_list_class(html_output)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user