Version 1.10.2
Fixes
-
Added an additional implementation of the
splitfilter, 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'sstr.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 newsplitfilter will be enabled by default when usingliquid.future.Environment, and can optionally be registered withliquid.Environmentfor those that don't mind the behavioral change. See #135. -
Fixed unexpected errors from the
datefilter when it's given an invalid format string. Previously we were raising aliquid.exceptions.Errorin response to aValueErrorfrom strftime. We now raise aFilterArgumentErrorwith its__cause__set to theValueError. -
Fixed handling of
"%s"date filter format strings. We now fall back to a string representation ofdatetime.timestamp()for platforms that don't support%s. Note that this is for"%s"exactly. We don't handle the more general case of%sappearing in a longer format string.