Add support for org-entities (e.g. ndash, mdash, \Aacute)

This commit is contained in:
Niklas Fasching 2018-12-11 22:05:57 +01:00
parent 7c082fc627
commit a55ed30e3d
7 changed files with 485 additions and 6 deletions

View file

@ -58,6 +58,13 @@ func (w *HTMLWriter) before(d *Document) {}
func (w *HTMLWriter) after(d *Document) {
w.writeFootnotes(d)
w.replaceHTMLEntities(d)
}
func (w *HTMLWriter) replaceHTMLEntities(d *Document) {
s := w.stringBuilder.String()
w.stringBuilder.Reset()
w.stringBuilder.WriteString(htmlEntityReplacer.Replace(s))
}
func (w *HTMLWriter) writeNodes(ns ...Node) {