Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature to ignore parsing errors when doing nested interpretation #1196

Merged
merged 5 commits into from
Sep 12, 2024

Conversation

jasmith-hs
Copy link
Contributor

This builds off the ContextConfiguration immutable object I added in #1195.

Nested interpretation is cancerous.
I can write an entirely well-formatted template:

Check this out: {{ my_var }}

And get SYNTAX_ERRORs if my_var is {% if.

Also, disabled tags which are attempted to be rendered in nested interpretation produce errors. It's probably better to just ignore the tags.
This functionality is behind the feature IGNORE_NESTED_INTERPRETATION_PARSE_ERRORS, which is disabled by default.

This PR accomplishes what #1151 aims to do, plus the added bonus of ignoring any parsing errors when using nested interpretation.

Base automatically changed from context-configuration to master September 9, 2024 14:22
@jasmith-hs jasmith-hs merged commit 11926b5 into master Sep 12, 2024
5 checks passed
@jasmith-hs jasmith-hs deleted the ignore-parse-errors branch September 12, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant