diff --git a/extension/_test/footnote.txt b/extension/_test/footnote.txt index 9b06721..0270c62 100644 --- a/extension/_test/footnote.txt +++ b/extension/_test/footnote.txt @@ -56,7 +56,7 @@ test![^1] [^1]: footnote //- - - - - - - - -// -

test1

+

test!1


    diff --git a/extension/footnote.go b/extension/footnote.go index 0b1ac9f..62f5ee6 100644 --- a/extension/footnote.go +++ b/extension/footnote.go @@ -175,6 +175,9 @@ func (s *footnoteParser) Parse(parent gast.Node, block text.Reader, pc parser.Co pc.Set(footnoteLinkListKey, fnlist) } pc.Set(footnoteLinkListKey, append(fnlist, fnlink)) + if line[0] == '!' { + parent.AppendChild(parent, gast.NewTextSegment(text.NewSegment(segment.Start, segment.Start+1))) + } return fnlink }