mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-01-27 12:33:17 +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)
|
||||
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
|
||||
html_output = add_long_list_class(html_output)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user