max-heller/mdbook-pandoc

Links to chapters are broken when using Pandoc 3.2 or later

max-heller opened this issue · 0 comments

Pandoc used to inject an anchor at the beginning of each file when --file-scope was used, and mdbook-pandoc could use these to link to the start of a chapter. This behavior was recently removed in jgm/pandoc@30442b7

To get around this, mdbook-pandoc will have to find or inject a different anchor at the beginning of each chapter. This should usually be achievable by finding the identifier of the first heading in the chapter (expected to be the first thing in the chapter), but it's unclear how to handle a chapter that doesn't start with a heading (see jgm/pandoc#9200 (comment) for discussion).