Add support for NAME keyword

This commit is contained in:
Niklas Fasching 2019-10-27 15:04:55 +01:00
parent 2afd11581c
commit 20970ec872
8 changed files with 63 additions and 3 deletions

View file

@ -164,6 +164,11 @@ func (w *OrgWriter) WriteNodeWithMeta(n NodeWithMeta) {
WriteNodes(w, n.Node)
}
func (w *OrgWriter) WriteNodeWithName(n NodeWithName) {
w.WriteString(fmt.Sprintf("#+NAME: %s\n", n.Name))
WriteNodes(w, n.Node)
}
func (w *OrgWriter) WriteComment(c Comment) {
w.WriteString(w.indent + "#" + c.Content + "\n")
}