fix footnote formatting
This commit is contained in:
parent
1c2705dcfe
commit
325ec6c40d
@ -198,7 +198,7 @@ func (w *troffOut) elem(elt *element, isFirst bool) *troffOut {
|
|||||||
w.s(".FS\n")
|
w.s(".FS\n")
|
||||||
w.skipPadding()
|
w.skipPadding()
|
||||||
w.children(elt)
|
w.children(elt)
|
||||||
w.req("FE")
|
w.req("FE\n")
|
||||||
}
|
}
|
||||||
case REFERENCE:
|
case REFERENCE:
|
||||||
/* Nonprinting */
|
/* Nonprinting */
|
||||||
|
@ -269,15 +269,23 @@ func (w *htmlOut) elem(elt *element) *htmlOut {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w *htmlOut) printEndnotes() {
|
func (w *htmlOut) printEndnotes() {
|
||||||
|
extraNewline := func() {
|
||||||
|
// add an extra newline to maintain
|
||||||
|
// compatibility with the C version.
|
||||||
|
w.padded--
|
||||||
|
}
|
||||||
|
|
||||||
counter := 0
|
counter := 0
|
||||||
|
|
||||||
w.s("<hr/>\n<ol id=\"notes\">")
|
w.s("<hr/>\n<ol id=\"notes\">")
|
||||||
for _, elt := range w.endNotes {
|
for _, elt := range w.endNotes {
|
||||||
counter++
|
counter++
|
||||||
|
extraNewline()
|
||||||
w.br().s(fmt.Sprintf("<li id=\"fn%d\">\n", counter)).skipPadding()
|
w.br().s(fmt.Sprintf("<li id=\"fn%d\">\n", counter)).skipPadding()
|
||||||
w.children(elt)
|
w.children(elt)
|
||||||
w.s(fmt.Sprintf(" <a href=\"#fnref%d\" title=\"Jump back to reference\">[back]</a>", counter))
|
w.s(fmt.Sprintf(" <a href=\"#fnref%d\" title=\"Jump back to reference\">[back]</a>", counter))
|
||||||
w.br().s("</li>")
|
w.br().s("</li>")
|
||||||
}
|
}
|
||||||
|
extraNewline()
|
||||||
w.br().s("</ol>")
|
w.br().s("</ol>")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user