mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-11 20:07:22 +00:00
1ffeb856ee
Add support for the `auto_identifiers`, `gfm_auto_identifiers`, and `ascii_identifiers` extensions in the man reader. Section headings parsed from .SH and .SS macros now receive auto-generated id attributes when the extension is enabled, enabling `--toc` to produce working anchor links. - Add `autoIdExtensions` to default man extensions [behavior change] - Add `HasReaderOptions`, `HasLogMessages` and `HasIdentifierList` to `ManState` to run `registerHeader` Closes #8852.
1002 B
1002 B
Github Formatted Markdown Identifiers
% pandoc -f man+gfm_auto_identifiers -t html
.TH "TEST" "1" "2026-05-08" "test v1.0.0" "test manual"
.SH 1st HEADING
.SH C++ & Rust
.SH HEADING
.SH HEADING
^D
<h1 id="1st-heading">1st HEADING</h1>
<h1 id="c--rust">C++ & Rust</h1>
<h1 id="heading">HEADING</h1>
<h1 id="heading-1">HEADING</h1>
Ascii Identifiers test
% pandoc -f man+ascii_identifiers -t html
.TH "TEST" "1" "2026-05-08" "test v1.0.0" "test manual"
.SH Über den Flüssen
^D
<h1 id="uber-den-flussen">Über den Flüssen</h1>
Headers without Auto Identifiers test
% pandoc -f man-auto_identifiers -t native
.TH "TEST" "1" "2026-05-08" "test v1.0.0" "test manual"
.SS Level 2
.SS different styles:
.SS Ordered
.SS Ordered
^D
[ Header
2 ( "" , [] , [] ) [ Str "Level" , Space , Str "2" ]
, Header
2
( "" , [] , [] )
[ Str "different" , Space , Str "styles:" ]
, Header 2 ( "" , [] , [] ) [ Str "Ordered" ]
, Header 2 ( "" , [] , [] ) [ Str "Ordered" ]
]