mirror of
https://github.com/tests-always-included/mo.git
synced 2025-11-19 23:34:32 +01:00
Moving delimiters and standalone to global vars
This commit is contained in:
@@ -53,6 +53,7 @@ Mo uses the following environment variables:
|
||||
MO_ALLOW_FUNCTION_ARGUMENTS - When set to a non-empty value, this allows
|
||||
functions referenced in templates to receive additional options and
|
||||
arguments.
|
||||
MO_CLOSE_DELIMITER - The string used when closing a tag. Defaults to "}}".
|
||||
MO_DEBUG - When set to a non-empty value, additional debug information is
|
||||
written to stderr.
|
||||
MO_FUNCTION_ARGS - Arguments passed to the function.
|
||||
@@ -64,8 +65,13 @@ MO_FAIL_ON_UNSET - When set to a non-empty value, expansion of an unset env
|
||||
variable will be aborted with an error.
|
||||
MO_FALSE_IS_EMPTY - When set to a non-empty value, the string "false" will
|
||||
be treated as an empty value for the purposes of conditionals.
|
||||
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
|
||||
help message.
|
||||
MO_STANDALONE_CONTENT - The content that preceeded the current tag. When a
|
||||
standalone tag is encountered, this is checked to see if it only
|
||||
contains whitespace. If this and the whitespace condition after a tag is
|
||||
met, then this will be reset to $'\n'.
|
||||
|
||||
Mo is under a MIT style licence with an additional non-advertising clause.
|
||||
See LICENSE.md for the full text.
|
||||
|
||||
@@ -4,14 +4,14 @@ cd "${0%/*}" || exit 1
|
||||
|
||||
export content=$'<\n->'
|
||||
template() {
|
||||
cat <<EOF
|
||||
cat <<'EOF'
|
||||
\
|
||||
{{>fixtures/standalone-indentation.partial}}
|
||||
/
|
||||
EOF
|
||||
}
|
||||
expected() {
|
||||
cat <<EOF
|
||||
cat <<'EOF'
|
||||
\
|
||||
|
|
||||
<
|
||||
|
||||
Reference in New Issue
Block a user