Spaces:
Sleeping
Sleeping
Tuchuanhuhuhu
commited on
Commit
•
aa34cd0
1
Parent(s):
6dab288
在代码生成完成之前显示代码块
Browse files
utils.py
CHANGED
@@ -90,7 +90,7 @@ def convert_mdtext(md_text):
|
|
90 |
non_code = normalize_markdown(non_code)
|
91 |
result.append(mdtex2html.convert(non_code, extensions=['tables']))
|
92 |
if code.strip():
|
93 |
-
code = f"```{code}```"
|
94 |
code = markdown_to_html_with_syntax_highlight(code)
|
95 |
result.append(code)
|
96 |
result = "".join(result)
|
|
|
90 |
non_code = normalize_markdown(non_code)
|
91 |
result.append(mdtex2html.convert(non_code, extensions=['tables']))
|
92 |
if code.strip():
|
93 |
+
code = f"```{code}\n\n```"
|
94 |
code = markdown_to_html_with_syntax_highlight(code)
|
95 |
result.append(code)
|
96 |
result = "".join(result)
|