Open kuruczgy opened 1 year ago
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 before parent child after
(which is what GitHub seems to do), but achieving that probably requires some additional logic.
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
Wheretest.md
contains:index.html
is the following: