Prevent code blocks from flickering while streaming
This commit is contained in:
parent
28bb7a8b57
commit
fd7257c7f8
1 changed files with 2 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue