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

Removes helpful parenthesis #96

Open
maxfenton opened this issue Feb 1, 2022 · 1 comment
Open

Removes helpful parenthesis #96

maxfenton opened this issue Feb 1, 2022 · 1 comment

Comments

@maxfenton
Copy link

input:
{% set style = ((style is defined) and style and (style in validStyles)) ? style : 'link' %}
output:

{% set style = style is defined and style and style in validStyles
  ? style
  : 'link'
%}

Could there be a flag (or is there) to not remove those?

@FlavienBusseuil
Copy link

Indeed.

{% set value = nb / (0 != total ? total : 1) %}
translates to:
{% set value = nb / 0 != total ? total : 1 %}
division by 0. 💀

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

No branches or pull requests

2 participants