Merge pull request #51 from adiabatic/master

Improve display of footnote backlinks
This commit is contained in:
Yusuke Inuzuka 2019-12-04 18:07:01 +09:00 committed by GitHub
commit 567046a85d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@ That's some text with a footnote.[^1]
<ol> <ol>
<li id="fn:1" role="doc-endnote"> <li id="fn:1" role="doc-endnote">
<p>And that's the footnote.</p> <p>And that's the footnote.</p>
<p>That's the second paragraph.<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#8617;</a></p> <p>That's the second paragraph. <a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li> </li>
</ol> </ol>
</section> </section>
@ -26,7 +26,7 @@ That's some text with a footnote.[^1]
<hr> <hr>
<ol> <ol>
<li id="fn:1" role="doc-endnote"> <li id="fn:1" role="doc-endnote">
<p>0 [^]:<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#8617;</a></p> <p>0 [^]: <a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li> </li>
</ol> </ol>
</section> </section>

View file

@ -240,7 +240,7 @@ func (r *FootnoteHTMLRenderer) renderFootnoteBackLink(w util.BufWriter, source [
_, _ = w.WriteString(` <a href="#fnref:`) _, _ = w.WriteString(` <a href="#fnref:`)
_, _ = w.WriteString(is) _, _ = w.WriteString(is)
_, _ = w.WriteString(`" class="footnote-backref" role="doc-backlink">`) _, _ = w.WriteString(`" class="footnote-backref" role="doc-backlink">`)
_, _ = w.WriteString("&#8617;") _, _ = w.WriteString("&#x21a9;&#xfe0e;")
_, _ = w.WriteString(`</a>`) _, _ = w.WriteString(`</a>`)
} }
return gast.WalkContinue, nil return gast.WalkContinue, nil