mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-29 21:50:16 +01:00
Prevent code blocks from flickering while streaming
This commit is contained in:
parent
28bb7a8b57
commit
fd7257c7f8
@ -71,10 +71,9 @@ def convert_to_markdown(string):
|
||||
else:
|
||||
result += '\n\n'
|
||||
|
||||
if is_code:
|
||||
result = result + '```' # Unfinished code block
|
||||
|
||||
result = result.strip()
|
||||
if is_code:
|
||||
result += '\n```' # Unfinished code block
|
||||
|
||||
# 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>.
|
||||
|
Loading…
Reference in New Issue
Block a user