Skip to content
Browse files

fix footnote formatting

  • Loading branch information...
1 parent 1c2705d commit 325ec6c40dd46f6b39ddfd2e3021697a726894bb @knieriem committed Jul 31, 2014
Showing with 9 additions and 1 deletion.
  1. +1 −1 out-groffmm.go
  2. +8 −0 output.go
View
2 out-groffmm.go
@@ -198,7 +198,7 @@ func (w *troffOut) elem(elt *element, isFirst bool) *troffOut {
w.s(".FS\n")
w.skipPadding()
w.children(elt)
- w.req("FE")
+ w.req("FE\n")
}
case REFERENCE:
/* Nonprinting */
View
8 output.go
@@ -269,15 +269,23 @@ func (w *htmlOut) elem(elt *element) *htmlOut {
}
func (w *htmlOut) printEndnotes() {
+ extraNewline := func() {
+ // add an extra newline to maintain
+ // compatibility with the C version.
+ w.padded--
+ }
+
counter := 0
w.s("<hr/>\n<ol id=\"notes\">")
for _, elt := range w.endNotes {
counter++
+ extraNewline()
w.br().s(fmt.Sprintf("<li id=\"fn%d\">\n", counter)).skipPadding()
w.children(elt)
w.s(fmt.Sprintf(" <a href=\"#fnref%d\" title=\"Jump back to reference\">[back]</a>", counter))
w.br().s("</li>")
}
+ extraNewline()
w.br().s("</ol>")
}

0 comments on commit 325ec6c

Please sign in to comment.
Something went wrong with that request. Please try again.