Spaces:
Sleeping
Sleeping
Tuchuanhuhuhu
commited on
Commit
·
80efddf
1
Parent(s):
aa34cd0
暂时移除代码高亮功能,在大段代码的情况下会出现问题。
Browse files如果你想体验代码高亮功能,可以注释掉utils.py的第93行。
utils.py
CHANGED
@@ -90,6 +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}\n\n```"
|
94 |
code = markdown_to_html_with_syntax_highlight(code)
|
95 |
result.append(code)
|
|
|
90 |
non_code = normalize_markdown(non_code)
|
91 |
result.append(mdtex2html.convert(non_code, extensions=['tables']))
|
92 |
if code.strip():
|
93 |
+
_, code = detect_language(code) # 暂时去除代码高亮功能,因为在大段代码的情况下会出现问题
|
94 |
code = f"```{code}\n\n```"
|
95 |
code = markdown_to_html_with_syntax_highlight(code)
|
96 |
result.append(code)
|