mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-25 17:29:22 +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:
|
else:
|
||||||
result += '\n\n'
|
result += '\n\n'
|
||||||
|
|
||||||
if is_code:
|
|
||||||
result = result + '```' # Unfinished code block
|
|
||||||
|
|
||||||
result = result.strip()
|
result = result.strip()
|
||||||
|
if is_code:
|
||||||
|
result += '\n```' # Unfinished code block
|
||||||
|
|
||||||
# Unfinished list, like "\n1.". A |delete| string is added and then
|
# 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>.
|
# removed to force a <ol> or <ul> to be generated instead of a <p>.
|
||||||
|
Loading…
Reference in New Issue
Block a user