识别部分bug修复#456
Merged
Merged
Conversation
ddfinshes
commented
Jun 16, 2025
Contributor
- paragraph部分
- inline两段text拼接时,中间是否使用空格拼接的判断更新(' '还是'')。避免中文双引号、单引号、(、[等拼接时用空格连接,导致一行内出现额外空格, 例如'( APC)', '“ I do wear..'。
- paragraph inline判断tags新增
- <sup>和 <sub>标签避免转义为<sup>和<sub>导致文本中上下标功能失效,重写replace_entities().
- code部分
- 原逻辑中classname中存在code单词即被打上code标签,导致audio、list类别内容被识别为code。增加一重判断,如果标签tag为audio、ul等就不被识别为code。
- list 部分
- 在list存入content item列表时,增加一重判断,避免item元素为''或者'-'依旧存入content_list中。
- 遇到<ul><ul></ul></ul>or<ul><div></div></ul>嵌套结构的列表没有被识别出来,导致正文缺少一部分列表内容。
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## dev #456 +/- ##
==========================================
- Coverage 89.97% 89.76% -0.21%
==========================================
Files 107 102 -5
Lines 8288 8465 +177
==========================================
+ Hits 7457 7599 +142
- Misses 831 866 +35
... and 12 files with indirect coverage changes 🚀 New features to boost your workflow:
|
yogacc33
reviewed
Jun 16, 2025
Contributor
There was a problem hiding this comment.
这里的处理逻辑是如何 p['c'] == '-' ,这个 - 就直接丢掉吗,哪些情况会出现 '-' ?
添加子元素的文本内容
if 'c' in p:
if p['c'] != '' and p['c'] != '-':
paragraph.append({'c': p['c'], 't': p.get('t', ParagraphTextType.TEXT)})
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
