-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Footnote in a footnote appears before other footnotes #410
Comments
Workaround for anyone finding this issue: diff --git a/extension/footnote.go b/extension/footnote.go
index d1b67aa..b856d92 100644
--- a/extension/footnote.go
+++ b/extension/footnote.go
@@ -91,8 +91,8 @@ func (b *footnoteBlockParser) Close(node gast.Node, reader text.Reader, pc parse
} else {
list = ast.NewFootnoteList()
pc.Set(footnoteListKey, list)
- node.Parent().InsertBefore(node.Parent(), node, list)
}
+ node.Parent().InsertBefore(node.Parent(), node, list)
node.Parent().RemoveChild(node.Parent(), node)
list.AppendChild(list, node)
} This solution seems kind of janky to me though, so I didn't want to submit it as a PR without prior discussion. Also, the ideal order IMO would be |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Ping |
goldmark has https://github.com/yuin/goldmark/discussions in github.
You should post only issues here. Feature requests and questions should be posted at discussions.
<
>
, Table, etc) are not part of CommonMark spec. You should confirm your output is different from other official renderers correspond with an extension.Please answer the following before submitting your issue:
v1.5.4
, https://github.com/kpym/gm:v0.11.4
go version go1.21.0 linux/amd64
linux/amd64
gm test.md
Where
test.md
contains:The order the footnotes appear in
index.html
is the following:The text was updated successfully, but these errors were encountered: