Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1061.
{% for user in users %}{{ user }}{% else %}EMPTY{% endfor %}currently renders an empty string for[]andaEMPTYbEMPTYfor['a', 'b']. This change rendersEMPTYandab, respectively.Split the direct
elsechild from the loop body and render it once when the collection is empty, in its own child scope. Nested branches, outer loop variables, and existingbreak/continuebehavior are preserved. Validation still checks both branches without emitting inactive output or applying its mutations. Eager rendering retains both alternatives for unresolved collections and isolates their speculative state changes before reconstruction. No public APIs, configuration options, or dependencies are added.Validation:
mvn --batch-mode -no-transfer-progress -V -Dproject.build.jdk.version=<17|21|25> verifypasses on Temurin 17, 21, and 25, with Maven running on Java 25: 2,269 tests per run, zero failures/errors, 23 skipped. Java 21 and 25 were checked in fresh checkouts of the same commit.en_USto avoid the previously reproduced, unrelated locale-dependent number-format assertions. Formatting, static checks, andgit diff --checkpass.Developed with AI assistance, including implementation, regression tests, and diff review.