Prevent code blocks from flickering while streaming

This commit is contained in:
oobabooga 2023-09-15 07:46:26 -07:00
parent 28bb7a8b57
commit fd7257c7f8

View File

@ -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>.