fix: generate IDs for HTML headings without id attribute (#36233)

This PR fixes #27383 where HTML headings like `<h1>Title</h1>` in
markdown files would have empty permalink anchors

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Gregorius Bima Kharisma Wicaksana
2026-01-06 12:09:44 +07:00
committed by GitHub
parent 1d01286f4c
commit f9d3983de2
6 changed files with 160 additions and 4 deletions
+1 -1
View File
@@ -314,7 +314,7 @@ func visitNode(ctx *RenderContext, procs []processor, node *html.Node) *html.Nod
return node.NextSibling
}
processNodeAttrID(node)
processNodeAttrID(ctx, node)
processFootnoteNode(ctx, node) // FIXME: the footnote processing should be done in the "footnote.go" renderer directly
if isEmojiNode(node) {