Implement #+MACRO

This commit is contained in:
Niklas Fasching 2020-04-17 16:41:06 +02:00
parent 2ab65d300a
commit 9f7e8a8fbd
9 changed files with 55 additions and 0 deletions

View file

@ -67,6 +67,11 @@ func (d *Document) parseKeyword(i int, stop stopFn) (int, Node) {
d.Links[parts[0]] = parts[1]
}
return 1, k
case "MACRO":
if parts := strings.Split(k.Value, " "); len(parts) >= 2 {
d.Macros[parts[0]] = parts[1]
}
return 1, k
case "CAPTION", "ATTR_HTML":
consumed, node := d.parseAffiliated(i, stop)
if consumed != 0 {