make sure labels have the right anchors

This commit is contained in:
Shane Liesegang 2020-01-13 12:07:38 -05:00
parent 04acf85d56
commit e9ec90f319

View file

@ -275,10 +275,11 @@ func (r *FootnoteHTMLRenderer) renderFootnoteBackLink(w util.BufWriter, source [
func (r *FootnoteHTMLRenderer) renderFootnote(w util.BufWriter, source []byte, node gast.Node, entering bool) (gast.WalkStatus, error) {
n := node.(*ast.Footnote)
is := strconv.Itoa(n.Index)
// is := strconv.Itoa(n.Index)
ref := string(n.Ref)
if entering {
_, _ = w.WriteString(`<li id="fn:`)
_, _ = w.WriteString(is)
_, _ = w.WriteString(ref)
_, _ = w.WriteString(`" role="doc-endnote"`)
if node.Attributes() != nil {
html.RenderAttributes(w, node, html.ListItemAttributeFilter)