自动生成书签的正则表达式执行晚于合并同尺寸标签
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the issue through the automatic bookmark flow: set the custom regex, enable merging adjacent headings with the same font size, and inspect the generated label around “The Power Set”. Trace the automatic bookmark generation entry point to determine when regex filtering and adjacent-label merging occur; done means filtering excludes the lowercase line before merging and the merge option reflects adjacent headings at the same level.
Written by the indexing model from the issue text.
Description
自动生成书签的正则表达式执行晚于合并同尺寸标签
导致不符合正则表达式的内容被合并入书签
重现问题的步骤
步骤如下:
- 用补丁丁打开Amann 和 Escher - 2005 - Analysis.pdf
2.翻到第21页,在“Elementary Facts”上右键,在菜单中选择 “设置自动书签标签格式(Z)” - 在弹出的“自动生成书签”列表中,选中刚刚设置的识别条件,点击“文本识别模式”选择“自定义文本匹配模式”,输入
^([A-Z][a-z]*,?\s*(?:and\s+)?)+。勾选:合并同字体尺寸的相邻标题。 - 该正则表达式理论上只会捕获大写字母开头的英文单词,但实际上会把小写的同字体内容合并进去,比如第22页的“The Power Set”与下一行的“power set”被合并成一个标签“The Power Set power set”
预期的结果或行为
- 应当先执行正则表达式的筛选,然后再合并标签
- “合并同字体尺寸的相邻标题”根据其实际功能应当是“合并同级别的相邻标题”
其它
复杂的正则表达式可能导致程序崩溃,比如^(?!\s)(?!(?:\s*(?:[0-9]+\.?)?\s*Proof)).*(?:\s*(?:[0-9]+\.?)?\s*[A-Z]+.*)+$,通常不影响使用,所以就不提issue了。
- Dominant language
- C#
- Stars
- 12.7k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wmjordan/PDFPatcher
-
360查杀 Open缺陷
Difficulty 4/5 3-5 days Newbie friendliness 35/100
wmjordan/PDFPatcher#314 · 1 comment ·
-
希望添加自定义显示字体的功能 Open书签 改进
wmjordan/PDFPatcher#311 · 3 comments · 1 assignee ·
-
打印预览 Open改进 重复
Difficulty 5/5 Over a week Newbie friendliness 25/100
wmjordan/PDFPatcher#310 · 1 comment ·
-
改进
wmjordan/PDFPatcher#308 · 3 comments · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
wmjordan/PDFPatcher#307 · 13 comments ·
All issues in wmjordan/PDFPatcher
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100