Skip to content

[fea-rs] Keep operand order in number value expressions - #2233

Merged
cmyr merged 1 commit into
mainfrom
fea-rs-number-expr-operand-order
Oct 12, 2026
Merged

cmyr merged 1 commit into
mainfrom
fea-rs-number-expr-operand-order

Conversation

@cmyr

@cmyr cmyr commented Oct 9, 2026

Copy link
Copy Markdown
Member

🤦 JMM

When the lhs of an operation was a literal and the rhs a number value,
we swapped them so that the number value was always on the left. That
is fine for + and *, but it meant `${100 - padding}` and
`${100 / padding}` computed `padding - 100` and `padding / 100`.

With this patch, we handle the (literal, number value) case directly.
@cmyr
cmyr added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit 9201c13 Oct 12, 2026
18 checks passed
@cmyr
cmyr deleted the fea-rs-number-expr-operand-order branch October 12, 2026 14:36
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.

2 participants