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

BUG: Jinja2 templating functionality breaks #25

Open
Korving-F opened this issue Mar 24, 2022 · 1 comment
Open

BUG: Jinja2 templating functionality breaks #25

Korving-F opened this issue Mar 24, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Korving-F
Copy link
Owner

Because the Jinja2 template / Scenario go through multiple steps of pre-processing, some scenarios using standard Jinja2 functionality breaks while it shouldn't.

# Does work: variables and filters
{{ some_variable | to_nice_json }}

# Does not work: statements
{% set my_var= "something" %}

# Untested: comments
{# my super duper comment #}
@Korving-F Korving-F added the bug Something isn't working label Mar 24, 2022
@Korving-F
Copy link
Owner Author

This is caused by the sequential sweep in scenario.py and most likely requires some regex-based string-replacement solution instead.

template_string = template_string.replace('"{{','{{').replace('}}"','}}')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant