From 785427d85c30aaee4c870cd4e7ba3f7a097db2e2 Mon Sep 17 00:00:00 2001 From: "Charles-P. Clermont" Date: Thu, 4 Dec 2025 15:15:50 -0500 Subject: [PATCH] Update History.md --- History.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/History.md b/History.md index 4337aeb9..8ebe4396 100644 --- a/History.md +++ b/History.md @@ -3,21 +3,22 @@ ## 6.0.0 ### Features -* (TODO) Add support for boolean expressions everywhere +* Add support for boolean expressions everywhere * As variable output `{{ a or b }}` * As filter argument `{{ collection | where: 'prop', a or b }}` * As tag argument `{% render 'snip', enabled: a or b %}` * As conditional tag argument `{% if cond %}` (extending previous behaviour) -* (TODO) Add support for subexpression prioritization and associativity +* Add support for subexpression prioritization and associativity * In ascending order of priority: * Logical: `and`, `or` (right to left) * Equality: `==`, `!=`, `<>` (left to right) * Comparison: `>`, `>=`, `<`, `<=`, `contains` (left to right) + * Groupings: `( expr )` - For example, this is now supported * `{{ a > b == c < d or e == f }}` which is equivalent to * `{{ ((a > b) == (c < d)) or (e == f) }}` -- (TODO) Add support for parenthesized expressions - * e.g. `(a or b) and c` +- Add support for parenthesized expressions + * e.g. `(a or b) == c` ### Architectural changes * `parse_expression` and `safe_parse_expression` have been removed from `Tag` and `ParseContext` @@ -32,10 +33,17 @@ * `:lax` and `lax_parse` is no longer supported * `:strict` and `strict_parse` is no longer supported * `strict2_parse` is renamed to `parse_markup` -* The `warnings` system has been removed. -* `Parser#expression` is renamed to `Parser#expression_string` -* `safe_parse_expression` methods are replaced by `Parser#expression` -* `parse_expression` methods are replaced by `Parser#unsafe_parse_expression` +* Expressions + * The `warnings` system has been removed. + * `Parser#expression` is renamed to `Parser#expression_string` + * `safe_parse_expression` methods are replaced by `Parser#expression` + * `parse_expression` methods are replaced by `Parser#unsafe_parse_expression` +* `Condition` + * `new(expr)` no longer accepts an `op` or `right`. Logic moved to BinaryExpression. + * `Condition#or` and `Condition#and` were replaced by `BinaryExpression`. + * `Condition#child_relation` replaced by `BinaryExpression`. + * `Condition.operations` was removed. + * `Condtion::MethodLiteral` was moved to the `Liquid` namespace ### Migrating from `^5.11.0` - In custom tags that include `ParserSwitching`, rename `strict2_parse` to `parse_markup`