").str(elt.contents.str).s("
")
case HTML:
s = elt.contents.str
case LINK:
o := w.obfuscate
if strings.Index(elt.contents.link.url, "mailto:") == 0 {
w.obfuscate = true /* obfuscate mailto: links */
}
w.s(` 0 {
w.s(` title="`).str(elt.contents.link.title).s(`"`)
}
w.s(">").elist(elt.contents.link.label).s("")
w.obfuscate = o
case IMAGE:
w.s(` 0 {
w.s(` title="`).str(elt.contents.link.title).s(`"`)
}
w.s(" />")
case EMPH:
w.inline("", elt)
case STRONG:
w.inline("", elt)
case LIST:
w.children(elt)
case RAW:
/* Shouldn't occur - these are handled by process_raw_blocks() */
log.Fatalf("RAW")
case H1, H2, H3, H4, H5, H6:
h := "", elt) case HRULE: w.sp().s("
").str(elt.contents.str).s("
")
case BULLETLIST:
w.listBlock("\n").skipPadding().children(elt).br().s("") case REFERENCE: /* Nonprinting */ case NOTE: /* if contents.str == 0, then print note; else ignore, since this * is a note block that has been incorporated into the notes list */ if elt.contents.str == "" { w.endNotes = append(w.endNotes, elt) /* add an endnote to global endnotes list */ w.notenum++ nn := w.notenum s = fmt.Sprintf(`[%d]`, nn, nn, nn, nn) } default: log.Fatalf("htmlOut.elem encountered unknown element key = %d\n", elt.key) } if s != "" { w.s(s) } return w } func (w *htmlOut) printEndnotes() { counter := 0 w.s("