Changing how parsed/unparsed content is tracked

Use global variables instead of passing to every function.

112 specs pass, 7 overridden, 62 fail, 7 skipped.
This commit is contained in:
Tyler Akins 2023-04-10 21:07:45 -05:00
parent d32b912472
commit 511a3187e8
No known key found for this signature in database
GPG Key ID: 8F3B8C432F4393BD
2 changed files with 323 additions and 531 deletions

834
mo

File diff suppressed because it is too large Load Diff

View File

@ -68,10 +68,12 @@ MO_FALSE_IS_EMPTY - When set to a non-empty value, the string "false" will
MO_OPEN_DELIMITER - The string used when opening a tag. Defaults to "{{". MO_OPEN_DELIMITER - The string used when opening a tag. Defaults to "{{".
MO_ORIGINAL_COMMAND - Used to find the `mo` program in order to generate a MO_ORIGINAL_COMMAND - Used to find the `mo` program in order to generate a
help message. help message.
MO_PARSED - Content that has made it through the template engine.
MO_STANDALONE_CONTENT - The content that preceeded the current tag. When a MO_STANDALONE_CONTENT - The content that preceeded the current tag. When a
standalone tag is encountered, this is checked to see if it only standalone tag is encountered, this is checked to see if it only
contains whitespace. If this and the whitespace condition after a tag is contains whitespace. If this and the whitespace condition after a tag is
met, then this will be reset to $'\n'. met, then this will be reset to $'\n'.
MO_UNPARSED - Template content yet to make it through the parser.
Mo is under a MIT style licence with an additional non-advertising clause. Mo is under a MIT style licence with an additional non-advertising clause.
See LICENSE.md for the full text. See LICENSE.md for the full text.