Skip to content

docs(zh-CN): fix plugin spec subsection numbering - #2002

Merged
vastsa merged 1 commit into
vastsa:mainfrom
alexrain:docs/zh-cn-plugin-heading-numbering
Oct 31, 2026
Merged

vastsa merged 1 commit into
vastsa:mainfrom
alexrain:docs/zh-cn-plugin-heading-numbering

Conversation

@alexrain

Copy link
Copy Markdown
Contributor

Summary

Fixes the malformed subsection headings in docs/zh-CN/spec/07-plugins/, where a space after the section number (3. 1) broke Markdown anchors and made the table of contents links unreliable.

Related to #2000 (P0: fix the 17 numbering issues). This PR covers the malformed headings that are still present on main.

Changes

  • Normalize ## 3. 1 ... to ## 3.1 ... across 01, 02, 04, 05 and 12.
  • Remove the duplicated ### 12. 1 激活范围控制 heading in 01-plugin-system.md.
  • Add the missing space in 贡献主题 CSS.

Verification

  • git diff --check passes.
  • rg '^#{2,4} [0-9]+\.[ \u3000][0-9]+' docs/zh-CN/spec/07-plugins returns no matches.

@Goldloli

Goldloli commented Oct 30, 2026 •

Copy link
Copy Markdown

We opened #2003 for the same fix and have closed it as a duplicate — you got here first. These verification results from the identical diff may help review:

  • Current main (97cc04d) has 15 malformed headings in 5 files: 01 (7, including the duplicated ### 12. 1 激活范围控制), 02 (2), 04 (4), 05 (1), 12 (1). 06-plugin-packaging.md has 9 headings whose numbering already matches the English file, so the "6 files / 17 issues" count in 招募:用 AI 对 PI-Desktop 插件文档做 review 与补齐(PR 必须关联本 issue) #2000 does not reproduce on current main; your PR matches the reproducible 15.
  • After applying the same edits locally: 0 malformed headings and 0 duplicate headings remain; the numbering sequence equals the English source for 01, 02, 05, 06 and 12; 04 is a subsequence of the English numbering because English has whole sections that are still untranslated (3.2, 6.4, parts of 8.2), which is a separate P0 item.
  • All ](#...) anchors inside the five changed files resolve to headings; git diff --check is clean; node docs/scripts/check-locales.mjs (86 pairs) and node docs/scripts/check-docs.mjs (598 pages) pass; node scripts/check-pr-base-main.mjs passes.

Out-of-scope findings, not touched by either PR: 04-plugin-security.md is missing the English 3.2 Session collaboration boundary and 6.4 Dropped-file grants sections (and parts of 8.2); 01-plugin-system.md's 6.1 主机主 heading looks truncated (English: "Host main"); docs/plugin-development.md links to 07-plugins/03-plugin-api.md#projects-workspace-fs, an anchor that does not exist on main.

@Tioit-Wang

Copy link
Copy Markdown
Collaborator

Merged. Thanks!

Verified on current main: the six 07-plugins pages listed in #2000 no longer contain any broken subsection numbering (### 3. 1 style), and the only remaining anomaly in that directory is 03-plugin-api.md:415 ###代理, which predates the issue and is a separate defect. Fixing the numbering without touching structure or copy was exactly the scope the issue asked for.

Thanks also for the care in not reflowing existing content — that is why this landed without a single conflict against the eight other documentation PRs in flight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants