feat(html): html_header_numbering section numbering for HTML export
CI / cargo fmt --check (push) Successful in 51s
CI / cargo clippy (push) Successful in 27s
CI / cargo test (push) Successful in 49s
CI / editor keymaps (push) Successful in 2m52s

Mirror vimwiki's html_header_numbering / html_header_numbering_sym:
top-level headings at or below the start level get a dotted section
number (1, 1.1, 1.2, ...) with a configurable trailing symbol. Off by
default (level 0). Nested headings in lists/quotes stay unnumbered,
matching upstream's document-level-only scan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-02 00:33:01 +00:00
parent 88114a65a4
commit 79b502fa5c
5 changed files with 184 additions and 3 deletions
+6
View File
@@ -252,6 +252,12 @@ pub fn render_page_html(
if !cfg.color_dic.is_empty() {
r = r.with_colors(cfg.color_dic.clone());
}
if cfg.html_header_numbering > 0 {
r = r.with_header_numbering(
cfg.html_header_numbering,
cfg.html_header_numbering_sym.clone(),
);
}
r.render_to_string(doc)
}