Add basic support for drawers

This commit is contained in:
Niklas Fasching 2018-12-16 23:50:01 +01:00
parent c012b0a533
commit 0186545123
8 changed files with 102 additions and 8 deletions

View file

@ -74,6 +74,8 @@ func (w *HTMLWriter) writeNodes(ns ...Node) {
w.writeHeadline(n)
case Block:
w.writeBlock(n)
case Drawer:
w.writeDrawer(n)
case FootnoteDefinition:
w.writeFootnoteDefinition(n)
@ -141,6 +143,10 @@ func (w *HTMLWriter) writeBlock(b Block) {
}
}
func (w *HTMLWriter) writeDrawer(d Drawer) {
w.writeNodes(d.Children...)
}
func (w *HTMLWriter) writeKeyword(k Keyword) {
if k.Key == "HTML" {
w.WriteString(k.Value + "\n")