Python-liquid

Latest version: v1.12.1

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 10

1.9.0

* Added If with or / and expressions
* Implemented .to_liquid for all objects which can be passed to liquid like Strings Arrays Hashes Numerics and Booleans. To export new objects to liquid just implement .to_liquid on them and return objects which themselves have .to_liquid methods.
* Added more tags to standard library
* Added include tag ( like partials in rails )
* [...] Gazillion of detail improvements
* Added strainers as filter hosts for better security [Tobias Luetke]
* Fixed that rails integration would call filter with the wrong "self" [Michael Geary]
* Fixed bad error reporting when a filter called a method which doesn't exist. Liquid told you that it couldn't find the filter which was obviously misleading [Tobias Luetke]
* Removed count helper from standard lib. use size [Tobias Luetke]
* Fixed bug with string filter parameters failing to tolerate commas in strings. [Paul Hammond]
* Improved filter parameters. Filter parameters are now context sensitive; Types are resolved according to the rules of the context. Multiple parameters are now separated by the Liquid::ArgumentSeparator: , by default [Paul Hammond]
{{ 'Typo' | link_to: 'http://typo.leetsoft.com', 'Typo - a modern weblog engine' }}
* Added Liquid::Drop. A base class which you can use for exporting proxy objects to liquid which can acquire more data when used in liquid. [Tobias Luetke]

class ProductDrop < Liquid::Drop
def top_sales
Shop.current.products.find(:all, :order => 'sales', :limit => 10 )
end
end
t = Liquid::Template.parse( ' {% for product in product.top_sales %} {{ product.name }} {% endfor %} ' )
t.render('product' => ProductDrop.new )
* Added filter parameters support. Example: {{ date | format_date: "%Y" }} [Paul Hammond]


LiquidScript Change Log

1.8.2

**Fixes**

- Fixed comparison of strings in logical expressions. Previously we only supported comparing strings for equality with `==` and `!=`, now we support `<`, `>`, `<=` and `>=` too.
- Fixed handling of superfluous expressions in `{% else %}` tags. We now silently ignore anything between `else` and `%}`, matching the behavior of Shopify/Liquid.
- Fixed handling of extra `{% else %}` and `{% elsif %}` blocks after the first `{% else %}` block. We now silently ignore extraneous blocks, matching the behavior of Shopify/Liquid.

1.8.1

**Fixes**

- Fixed the `split` filter. Previously, when the `split` filter's argument string was equal to its input string, we returned an array with empty strings. Now we return an empty array.

1.8.0

**Fixes**

- Fixed comparison of simple arrays with `{% if %}`, `{% unless %}` and `{% case %}` tags. Previously, two simple arrays with the same elements would not be considered equal.
- Fixed the standard `map` filters handling of nested input arrays. We now automatically flatten nested input arrays and coerce non-iterable inputs to a single element array, just like Ruby Liquid.
- Fixed the `{% liquid %}` tag's handling of some corner cases involving nested `liquid` tags.

**Features**

- Added the standard `sum` filter, which returns the sum of any numeric values in its input array ([docs](https://jg-rp.github.io/liquidscript/language/filters#sum), [source](https://github.com/jg-rp/liquidscript/blob/622a8c1e79ac34b354037ab88be590c13d53d928/src/builtin/filters/array.ts#L290)).
- Added optional `{% extends %}` and `{% block %}` tags that add template inheritance features to Liquid templates ([docs](https://jg-rp.github.io/liquidscript/extra/tags#extends--block), [source](https://github.com/jg-rp/liquidscript/blob/main/src/extra/tags/extends.ts)).
- Added `filter` and `tag` properties to the result of `Template.analyze()`, containing the locations of filters and tags found during static analysis ([docs](https://jg-rp.github.io/liquidscript/guides/static-analysis#filters)).

1.7.0

**Features**

- Allow customization of local namespace limits by overriding `RenderContext.assignScore`. See [5](https://github.com/jg-rp/liquidscript/issues/5).
- New `macro` and `call` tags. Define parameterized Liquid snippets with the `macro` tag and call them using the `call` tag. `macro` and `call` are optional extra tags that need to be explicitly registered with a `liquidscript.Environment`. ([docs](https://jg-rp.github.io/liquidscript/extra/tags#macro--call), [source](https://github.com/jg-rp/liquidscript/blob/main/src/extra/tags/macro.ts))
- New drop-in replacements for the standard output statement (`{{ output }}`), `assign` tag and `echo` tag that support inline conditional expressions, optionally including a logical `not` operator and grouping terms with parentheses. ([docs](https://jg-rp.github.io/liquidscript/extra/tags#inline-if--else), [source](https://github.com/jg-rp/liquidscript/blob/main/src/extra/tags/if_expressions.ts))

**Compatibility**

- Allow whitespace control from `raw` tags. See [Shopify/liquid 1683](https://github.com/Shopify/liquid/pull/1683>).
- Support bracketed variables without a leading identifier. See [Shopify/liquid 1680](https://github.com/Shopify/liquid/pull/1680>).

1.6.0

**Fixes**

- Fixed the string representation of variable paths that contain bracketed string elements with a dot. Previously `foo["x.y"].bar` would be represented as `foo.x.y.bar`. Now we retain the quoted property name `foo["x.y"].bar`. It is this string representation that is exposed in the results of `Template.analyze()`. See [9](https://github.com/jg-rp/liquidscript/issues/9).
- Fixed `{% cycle %}` tag behavior when given a cycle group name. See [Python Liquid/43](https://github.com/jg-rp/liquid/issues/43).
- Fixed the `round` filter when given non-integer arguments. See [Shopify/liquid1590](https://github.com/Shopify/liquid/issues/1590).
- Allow string literals to be used as a `{% for %}` tag iterable. See [Python Liquid/102](https://github.com/jg-rp/liquid/issues/102).

**Features**

- Include comment text in a template's abstract syntax tree. We used to strip comment text out, as a space saving measure, but static analysis of comment text will be required when implementing translation message extraction.

Page 6 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.