Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@JohnathonKoster
Copy link
Contributor

This PR fixes #12247

Internally, the parser rewrites unless blocks:

{{ unless { the_var } }}
    ...
{{ /unless }}

into its corresponding if statement:

{{ if ! ({ the_var }) }}
    ...
{{ /if }}

After investigation, it was discovered that the interpolated regions produced by the nested { the_var } syntax was not being copied to the rewritten node. This PR copies this information, allowing the unless node to work correctly in this situation.

@jasonvarga jasonvarga merged commit 3e9f43a into statamic:5.x Sep 2, 2025
25 checks passed
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.

unless not opposite to if in Antlers, when condition variables have brackets

2 participants