forked from mirror/MrDoc
修复部分情况下文档摘要导致文集页响应卡顿的问题
This commit is contained in:
parent
d54976c646
commit
ced0cb11bf
@ -94,11 +94,13 @@ def remove_markdown_tag(docs):
|
|||||||
for doc in docs:
|
for doc in docs:
|
||||||
try:
|
try:
|
||||||
if doc.editor_mode == 3: # 富文本文档
|
if doc.editor_mode == 3: # 富文本文档
|
||||||
doc.content = strip_tags(doc.content)
|
doc.content = strip_tags(doc.content)[:201]
|
||||||
|
elif doc.editor_mode == 4:
|
||||||
|
doc.pre_content = "此为表格文档,进入文档查看详细内容"
|
||||||
else: # 其他文档
|
else: # 其他文档
|
||||||
doc.pre_content = strip_tags(markdown.markdown(doc.pre_content))
|
doc.pre_content = strip_tags(markdown.markdown(doc.pre_content))[:201]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
doc.pre_content = doc.pre_content
|
doc.pre_content = doc.pre_content[:201]
|
||||||
|
|
||||||
# 获取文集的文档目录
|
# 获取文集的文档目录
|
||||||
def get_pro_toc(pro_id):
|
def get_pro_toc(pro_id):
|
||||||
|
Loading…
Reference in New Issue
Block a user