You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Eager inlines a negative value at the start of {{ }}, which legacy parsing reads as whitespace control #5
eager executionBug caused by eager execution (deferred rendering)isolatedReproducible and fixable in one source file plus a test filesev3Narrow trigger, legacy-only config, or a loud (FATAL) error
With lenient whitespace-control parsing (legacy overrides built from LegacyOverrides.newBuilder()), a - at the start of an expression is read as a trim marker even after a space. Eager output can start with an inlined negative value, so the second pass drops the minus. The 3.0 default (THREE_POINT_0, strict parsing) is not affected.
Repro
{# legacy overrides; c = -1, a deferred #}
{{ c + a }}
{# eager output: {{ -1 + a }} evaluates to: 1 expected: -1#}
Underlying parser quirk (known, not a new bug): with LegacyOverrides.NONE, a hand-written {{ -1 + 1 }} renders 2; covered upstream by LegacyWhitespaceControlParsingTest. Tags are safe because their text starts with the tag name.
Verified with probes: {{ c + a }} and {{ c - a }} fail under legacy; {{ a + c }} and the 3.0 overrides are fine; parenthesized forms render correctly.
Fix sketch (not implemented)
In wrapInExpression, when the output starts with - (after whitespace), emit {{ (<output>) }}, optionally only when !isParseWhitespaceControlStrictly(). {{ (-1 + a) }} renders -1 under legacy parsing.
Classification
isolated: EagerExpressionStrategy.java plus a test under both legacy and 3.0 overrides.
changed the title [-]PBT-3: Eager inlines a negative value at the start of `{{ }}`, which legacy parsing reads as whitespace control[/-][+]Eager inlines a negative value at the start of `{{ }}`, which legacy parsing reads as whitespace control[/+]on Nov 24, 2026
eager executionBug caused by eager execution (deferred rendering)isolatedReproducible and fixable in one source file plus a test filesev3Narrow trigger, legacy-only config, or a loud (FATAL) error
Activity
[-]PBT-3: Eager inlines a negative value at the start of `{{ }}`, which legacy parsing reads as whitespace control[/-][+]Eager inlines a negative value at the start of `{{ }}`, which legacy parsing reads as whitespace control[/+]