Skip to content

Commit

Permalink
Update change log and bump version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
jg-rp committed Dec 14, 2023
1 parent a0dc1cc commit 632e1fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Python Liquid Change Log

## Version 1.11.0 (unreleased)

**Fixes**

- Added an additional implementation of the `split` filter, which resolves some compatibility issues between Python Liquid's and the reference implementation. Previously, when given an empty string to split or when the string and the delimiter were equal, we used Python's `str.split()` behavior of producing one or two element lists containing empty strings. We now match Shopify/Liquid in returning an empty list for such cases. The new `split` filter will be enabled by default when using [`liquid.future.Environment`](https://jg-rp.github.io/liquid/api/future-environment), and can optionally be registered with `liquid.Environment` for those that don't mind the behavioral change. See [#135](https://github.com/jg-rp/liquid/pull/135).

## Version 1.10.1

**Fixes**
Expand Down
2 changes: 1 addition & 1 deletion liquid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

from . import future

__version__ = "1.10.1"
__version__ = "1.11.0"

__all__ = (
"AwareBoundTemplate",
Expand Down
3 changes: 1 addition & 2 deletions liquid/future/filters/_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ def split(val: str, sep: str) -> List[str]:
"""Split string _val_ on delimiter _sep_.
If _sep_ is empty or _undefined_, _val_ is split into a list of single
characters. If _val_ is empty or equal to _sep_, and empty list is
returned.
characters. If _val_ is empty or equal to _sep_, an empty list is returned.
"""
if not sep:
return list(val)
Expand Down

0 comments on commit 632e1fe

Please sign in to comment.