Add support for latex fragments

This commit is contained in:
Niklas Fasching 2019-09-28 15:03:15 +02:00
parent de302bbc0a
commit 76b157b8ce
8 changed files with 137 additions and 10 deletions

View file

@ -247,6 +247,12 @@ func (w *HTMLWriter) WriteEmphasis(e Emphasis) {
w.WriteString(tags[1])
}
func (w *HTMLWriter) WriteLatexFragment(l LatexFragment) {
w.WriteString(l.OpeningPair)
WriteNodes(w, l.Content...)
w.WriteString(l.ClosingPair)
}
func (w *HTMLWriter) WriteStatisticToken(s StatisticToken) {
w.WriteString(fmt.Sprintf(`<code class="statistic">[%s]</code>`, s.Content))
}