mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-24 17:06:53 +01:00
UI: handle another edge case while streaming lists
This commit is contained in:
parent
0e138e4be1
commit
8ec8bc0b85
@ -85,7 +85,7 @@ def convert_to_markdown(string):
|
||||
|
||||
# Unfinished list, like "\n1.". A |delete| string is added and then
|
||||
# removed to force a <ol> or <ul> to be generated instead of a <p>.
|
||||
list_item_pattern = r'(\n\d+\.?|\n\*\s*|\n\s*[-*+]\s*)$'
|
||||
list_item_pattern = r'(\n\d+\.?|\n\s*[-*+]\s*([*_~]{1,3})?)$'
|
||||
if re.search(list_item_pattern, result):
|
||||
delete_str = '|delete|'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user