Add support for NAME keyword
This commit is contained in:
parent
2afd11581c
commit
20970ec872
8 changed files with 63 additions and 3 deletions
|
@ -12,6 +12,7 @@ type Writer interface {
|
|||
WriteInclude(Include)
|
||||
WriteComment(Comment)
|
||||
WriteNodeWithMeta(NodeWithMeta)
|
||||
WriteNodeWithName(NodeWithName)
|
||||
WriteHeadline(Headline)
|
||||
WriteBlock(Block)
|
||||
WriteExample(Example)
|
||||
|
@ -46,6 +47,8 @@ func WriteNodes(w Writer, nodes ...Node) {
|
|||
w.WriteComment(n)
|
||||
case NodeWithMeta:
|
||||
w.WriteNodeWithMeta(n)
|
||||
case NodeWithName:
|
||||
w.WriteNodeWithName(n)
|
||||
case Headline:
|
||||
w.WriteHeadline(n)
|
||||
case Block:
|
||||
|
@ -90,7 +93,7 @@ func WriteNodes(w Writer, nodes ...Node) {
|
|||
w.WriteFootnoteDefinition(n)
|
||||
default:
|
||||
if n != nil {
|
||||
panic(fmt.Sprintf("bad node %#v", n))
|
||||
panic(fmt.Sprintf("bad node %T %#v", n, n))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue