mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 23:46:14 +02:00
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:
1 parent
1d01286f4c
commit
f9d3983de2
6 files changed
+160
-4
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user