fix: 修复导入带有表格样式的md文件分段后表格格式丢失 #615 (#630)
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled

This commit is contained in:
shaohuzhang1 2024-06-13 10:41:52 +08:00 committed by GitHub
parent 3a7c4d3568
commit 7a5bfa2673
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -335,6 +335,7 @@ class SplitModel:
:param text: 文本数据
:return: 解析后数据 {content:段落数据,keywords:[段落关键词],parent_chain:['段落父级链路']}
"""
text = text.replace('\r\n', '\n')
text = text.replace('\r', '\n')
text = text.replace("\0", '')
result_tree = self.parse_to_tree(text, 0)