Comments (2)
是首层被识别成二层了么? 首层文本能同时匹配当前的首层和二层正则,所以被当成二层了。优化一下正则最后加个空格就能更精确匹配了
from pdfdir.
@Robin329 正则表达式需要更加精确, 底层逻辑是从高层级的匹配优先级更高, 如果满足的二级的正则表达式, 则目录被归为二级.
英文目录匹配可以参考这组正则:
^\d+\.\s\?
^\d+\.\d+\w?\s?
^\d+\.\d+\.\d+\w?\s?
^\d+\.\d+\.\d+\.\d+\w?\s?
^\d+\.\d+\.\d+\.\d+\.\d+\w?\s?
^\d+\.\d+\.\d+\.\d+\.\d+\.\d+\w?\s?
这组正则支持 正常的英文目录, 以及类似 1.1a 这种额外的标记; 同时支持目录标记与标题贴贴的情况 如 1.1.1balabal
from pdfdir.
Related Issues (20)
- [懒人包]章节, 分节, 小节的正则表达式的提供 HOT 2
- 迁移到pypdf2 2.x HOT 2
- [BUG]RuntimeError: wrapped C/C++ object of type QTreeWidgetItem has been deleted HOT 1
- 感觉好多bug HOT 3
- 软件打开以后显示不全怎么办 HOT 2
- 可以发一下新版本的release吗 HOT 9
- MacOS 12.6 点击写入,直接闪退 HOT 1
- 有目录无书签的pdf文件生成新的带书签的pdf文件后,原先目录不支持点击跳转了 HOT 3
- v0.3.0-beta4在M1版macOS 12.6下,点写入时闪退 HOT 1
- 在mac端对部分pdf文件闪退 HOT 3
- Win端写入直接闪退 HOT 11
- 自动格式化整理目录文体(空格) HOT 1
- macos安装软件后launch pad不显示图标 HOT 3
- 软件挺好用的,但是没有适配mac的retina屏幕
- 用了好几年的人来夸夸作者 HOT 2
- [bug]命令行中目录字符串只能读取一行 HOT 1
- [bug?] Linux下gui缺少功能(源码运行) HOT 3
- [bug]有三级目录时识别正确但写入错误 HOT 2
- 关于目录层级显示的问题 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdfdir.