1.0.21
Skip a single heading, a plugin that finally speaks up, and eight releases' worth of fixes / 单标题跳过、一个终于会说话的插件,外加攒了八个版本的修复
English
This release bundles everything since 1.0.13 — 1.0.14 through 1.0.21 were built but not published individually, so if you're upgrading from the store's current 1.0.13, all of this is new to you.
- Skip numbering on a single heading: append
<!-- skip -->to the end of any heading line (case-insensitive, tolerant of extra spaces) and the plugin leaves it alone — no number, and it doesn't consume a counter slot either, so headings after it stay consecutive. Add the marker to a heading that already has a number and the next renumber removes that number. It's invisible in reading view. This solves the case the whitelist can't: "this one heading, in this one note, shouldn't be numbered — but the same word is a real chapter title elsewhere." For now it only affects the line it's on, not headings nested under it; a one-click toggle next to the heading is planned so you won't have to type it by hand. - Headings inside comment blocks are now skipped:
#lines inside%%…%%and<!-- -->are no longer treated as headings — not numbered, and they don't consume a counter slot either, so commenting a section out no longer shifts every number after it. - "Foreign numbering detected" no longer goes silent forever. Previously, once the plugin skipped a file because its headings looked like someone else's numbering scheme, it warned you once and then said nothing else — ever, until you cleaned the file up yourself or reloaded the plugin. From your side, the plugin had simply stopped working on that file, with no clue why. Now: switching away from the file and back gets you a fresh warning, and the warning itself is clickable — click it to see exactly which headings look foreign and what they'd become, before anything is touched. Nothing is ever auto-cleaned without that preview, because the same detection that catches real foreign numbering also flags perfectly ordinary headings like "API design" or "TODO list."
- "Clear numbering in current file" actually works now. It used to be decorative: the command cancelled the one pending debounce timer, then your next keystroke renumbered the file right back. Clearing now also pauses that file (writes
obsidian-auto-headings: false, folded into the same transaction so one undo reverts everything). Run Renumber now to hand the file back — it removes the property, making clear ↔ renumber a symmetric pair. - The plugin no longer fights you for the keyboard. Type a space at the end of a heading and pause — that space used to get silently stripped by the automatic renumber. The automatic path now leaves the line your cursor is on alone; it's picked up on the next trigger after you move away.
- Copy sanitization is now always on, with nothing to configure. Copying or cutting numbered headings has stripped the plugin's invisible marker character from your clipboard since 1.0.10, behind a default-on switch. The switch is gone: not putting invisible characters in your clipboard is a promise this plugin keeps, not something you opt into. Pasting the same text back into your vault in the same session still restores the original, so numbering re-flows correctly.
- Freeze numbering and release ownership (entire vault) — Settings → sensitive operations. Keeps every number exactly as it is, as plain text, removes only the invisible markers, and stops all automatic numbering from then on — for "I like my numbering, I just don't want a plugin managing it" or "I'm uninstalling but want to keep the result." Markers are removed everywhere, including inside link anchors, so
[[note#heading]]links keep resolving. - Docs: the Pandoc export path has actually been tested (pandoc 3.10). A working filter ships at
assets/pandoc/strip-autoheadings.lua. The Dataview guidance has been corrected — there is nofile.headersfield, so the query this README used to suggest never worked.
中文
本次发布合并了 1.0.13 之后的全部改动——1.0.14 到 1.0.21 都已开发但未单独发布,所以如果你是从商店当前在架的 1.0.13 升级,以下全是新东西。
- 单个标题可以跳过编号:在任意标题行尾加上
<!-- skip -->(大小写不敏感、容忍多余空格),插件就不再碰它——不编号,也不占计数器槽位,后面的标题照常连续编号。给一个已经有编号的标题补上这个标记,下次重排会把那个编号摘掉。它在阅读视图里不可见。这解决了白名单管不了的场景:「这篇笔记里的这一个标题不该编号,但同一个词在别的笔记里是正常的章节标题」。目前只作用于标记所在的这一行,不含下面的子标题;后续会在标题旁提供一键切换,不必再手写。 - 注释块内的标题不再被编号:
%%…%%与<!-- -->内的#行不再视为标题——不编号,也不占计数器槽位,所以注释掉一节不会再让后面所有编号整体错位。 - 「检测到疑似外来编号」不再永久沉默。 此前插件因为某个文件的标题看起来像别的编号方案而跳过它时,只提示一次,然后就再也没有任何反应——直到你自己把文件清理干净,或者重新加载插件。从你的角度看,插件在那个文件里就是安安静静地不工作了,没有任何线索。现在:切到别的文件再切回来会再收到一次提醒,而且这条提醒可以点击——点击后会先列出到底是哪些标题看起来带编号、清理后会变成什么样,确认过再动手。绝不会在没有预览的情况下自动清理:同一套判断在抓真正的外来编号时,也会把「API design」「TODO list」这类完全正常的标题一起误判进去。
- 「清除当前文件编号」不再是摆设。 它此前只取消了当前那一个待处理的防抖计时器,你下一次按键就把编号编了回去。现在清除会同时暂停这一个文件(写入
obsidian-auto-headings: false,并入同一次事务,一次撤销即整体回退)。想重新交给插件管,跑一次**「立即重新编号」**即可,它会顺手移除那条属性。 - 插件不再跟你抢键盘。 在标题末尾敲一个空格然后停顿,那个空格此前会被自动重排静默吃掉。自动路径现在会放过光标所在的那一行;等你把光标移开,下一次触发再补上。
- 复制净化现在恒开,无需任何配置。 复制或剪切含编号标题的内容时,插件从 1.0.10 起就会把那个不可见标记字符从剪贴板里剥净,此前是一个默认开的开关。现在开关取消了:不往你的剪贴板里塞隐形字符是这个插件的固有承诺,不是一个你需要去打开的选项。同一会话内原样粘贴回本库仍会自动还原原文,编号照常正确重排。
- 固化编号并交还所有权(全库)——设置 → 敏感操作。原样保留全部编号、只把不可见标记移除,此后插件停止一切自动编号,适合「喜欢现在的编号,只是不想再被插件管着」或「准备卸载但要留住编号成果」。标记全库移除,包括写在内部链接锚点里的,
[[笔记#标题]]仍能正常解析。 - 文档:Pandoc 导出路径这次真的实测过了(pandoc 3.10)。仓库内置可用的
assets/pandoc/strip-autoheadings.lua。Dataview 的建议也已订正——它没有file.headers字段,README 此前推荐的那条查询从来就不可能生效。
Upgrade note / 升级说明
Nothing in your existing files changes on upgrade. The one setting that's gone is copy sanitization — it used to be a toggle in Settings → General, and it's simply always on now, so if you'd turned it off, copying will start stripping the marker character again (this only affects what other apps receive when you copy/cut; your notes are untouched).
升级不改动你现有的任何文件。唯一消失的设置是**「复制净化」**开关——原来在 设置 → 全局设置 里,现在恒开,如果你之前关过它,复制时会重新开始剥离标记字符(这只影响你复制/剪切时外部应用收到的内容,你的笔记文件不受影响)。