This PR introduces two functional changes. The first being supporting a "lax" parsing mode, the second being a "lax" rendering mode. Each additional change extends the functionality, but does not change the default behavior.
Parsing Mode:
In lax parsing mode, an undefined filter will simply return an internal
noop filter. That filter will simply pass along the string to the next
filter, if one is provided.
In strict parsing mode, an undefined filter will continue to return an
error.
Rendering Mode:
In lax rendering mode, an undefined variable will simply be rendered as
a nil value which will ultimately result in an empty string.
In strict rendering mode, an undefined variable will continue to return
an error.
Following up on the issue I created here: https://github.com/cobalt-org/liquid-rust/issues/490
This PR introduces two functional changes. The first being supporting a "lax" parsing mode, the second being a "lax" rendering mode. Each additional change extends the functionality, but does not change the default behavior.
Parsing Mode:
In lax parsing mode, an undefined filter will simply return an internal noop filter. That filter will simply pass along the string to the next filter, if one is provided.
In strict parsing mode, an undefined filter will continue to return an error.
Rendering Mode:
In lax rendering mode, an undefined variable will simply be rendered as a
nil
value which will ultimately result in an empty string.In strict rendering mode, an undefined variable will continue to return an error.