Directive parsing

This commit is contained in:
Jamie Hardt
2022-11-18 16:59:39 -08:00
parent b419814f82
commit 28cf7b5d09
2 changed files with 4 additions and 4 deletions

View File

@@ -114,13 +114,13 @@ a list of words
The following commands are available:
pagesize `(letter|legal|a4)`
page $SIZE=`(letter|legal|a4)`
Sets the PDF page size for the output.
font -n `name` -p `path`
font {NAME=`name`} {PATH=`path`}
Sets the primary font for the output.
sub [-t `tag`] -t `text_to_replace` `replacement text`
sub `replacement text` {FOR=`text_to_replace`} {IN=`tag`}
Declares a substitution. Whereever text_to_replace is encountered in the
document it will be replaced with "replacement text".

View File

@@ -23,7 +23,7 @@ tag_grammar = Grammar(
tag_junk = word word_sep?
word = ~r"[^ \[\{\$][^ ]*"
word_sep = ~r" +"
modifier = ("@" / "&") word_sep?
modifier = ("@" / "&" / "!") word_sep?
"""
)