From d8d1e9e39e86f2716d6e8b56b2417b0adeb5178e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Fr=C3=B3es=20Franco?= Date: Tue, 2 Jun 2026 00:37:37 +0000 Subject: [PATCH] docs(gap): check off html_header_numbering Co-Authored-By: Claude Opus 4.8 (1M context) --- development/vimwiki-gap.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/development/vimwiki-gap.md b/development/vimwiki-gap.md index 45ebf03..ae332d0 100644 --- a/development/vimwiki-gap.md +++ b/development/vimwiki-gap.md @@ -385,7 +385,19 @@ fix site. not inter-page links) and the `custom_wiki2html` arg contract is an exact match — only the feed document shape diverges. - [ ] `emoji_enable` — emoji substitution. -- [ ] `html_header_numbering` (+`_sym`) — numbered HTML headers. +- [x] **`html_header_numbering` (+`_sym`)** — numbered HTML headers. _Fix:_ + `HtmlConfig` (`config.rs`) gained `html_header_numbering: u8` (start level, + `0` = off) + `html_header_numbering_sym: String` (trailing symbol), both + round-tripped through `RawWiki`/defaults. A `HeadingNumberer` in + `nuwiki-core/src/render/html.rs` walks top-level headings in document order, + bumping per-depth counters and emitting a dotted prefix (`1`, `1.1`, …); + `render_body` numbers only document-level headers (nested ones in lists/ + quotes stay unnumbered, matching upstream's line scan). Wired via + `with_header_numbering()` from `export.rs`. Tests: + `render_page_html_numbers_headers_when_enabled`, + `…_numbering_skips_headers_above_start_level`, + `…_no_header_numbering_by_default` (`html_export.rs`) + config round-trip + + defaults (`index_and_config.rs`). - [ ] `valid_html_tags` — allowed inline HTML tags in export. - [ ] `generated_links_caption`, `toc_link_format`, `markdown_link_ext`. - [ ] `list_ignore_newline` / `text_ignore_newline` — export newline handling.