This commit is contained in:
yuin 2020-12-26 18:08:59 +09:00
parent 748fc079dc
commit 6c741ae251
2 changed files with 4 additions and 1 deletions

View file

@ -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>

View file

@ -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
}