Skip to content

Commit

Permalink
Fixes #176
Browse files Browse the repository at this point in the history
  • Loading branch information
yuin committed Dec 26, 2020
1 parent 748fc07 commit 6c741ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion extension/_test/footnote.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test![^1]

[^1]: footnote
//- - - - - - - - -//
<p>test<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<p>test!<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<section class="footnotes" role="doc-endnotes">
<hr>
<ol>
Expand Down
3 changes: 3 additions & 0 deletions extension/footnote.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6c741ae

Please sign in to comment.