feat(html): html_header_numbering section numbering for HTML export
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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user