History.md
:rigid error mode to :strict2 and display a warning when users attempt to use the :rigid mode [Guilherme Carreiro]:rigid error mode for stricter, safer parsing of all tags [CP Clermont, Guilherme Carreiro]Doc tag [James Meng]{% doc %} tag to be visitable [Guilherme Carreiro]{% doc %} tag [Guilherme Carreiro]find and find_indexfilters to return nil when filtering empty arrays [Guilherme Carreiro]has filter to return false when filtering empty arrays [Guilherme Carreiro]find, find_index, has, and reject filters to arrays [Guilherme Carreiro]string_scanner to avoid errors with Liquid::VariableLookup.parse("foo.bar") [Ian Ker-Seymer]lru_redux dependency [Michael Go]Environment class to manage configuration and state that was previously stored in Template [Ian Ker-Seymer]Template to Environment [Ian Ker-Seymer]StrainerFactory in favor of Environment-based strainer creation [Ian Ker-Seymer]Tags module with STANDARD_TAGS constant [Ian Ker-Seymer]Lexer with a new Lexer2 implementation using jump tables for faster tokenization, requires Ruby 3.4 [Ian Ker-Seymer]Template class methods in favor of Environment methods [Ian Ker-Seymer]Please reference the GitHub release for more information.
# to be used as an inline comment tag (#1498) [CP Clermont]PartialCache now shares snippet cache with subcontexts by default (#1553) [Chris AtLee]ParseTreeVisitor for with variable expressions in Render tag (#1596) [CP Clermont]static_registers.rb (#1531) [Peter Zhu]remove_last, and replace_last filters (#1422) [Anders Hagbard]base64_encode, base64_decode, base64_url_safe_encode, and base64_url_safe_decode filters (#1450) [Daniel Insley]to_liquid_value in Liquid::Drop (#1441) [Michael Go]ParseTreeVisitor to RangeLookup (#1470) [CP Clermont]RangeError to Liquid::Error for truncatewords with large int (#1431) [Dylan Thacker-Smith]{% render %} tag (#1122) [Samuel Doiron]as in {% render %} and {% include %} (#1181) [Mike Angell]{% liquid %} and {% echo %} tags (#1086) [Justin Li]Tag.disable_tags for disabling tags that prepend Tag::Disableable at render time (#1162, #1274, #1275) [Mike Angell]RANGES_REGEX regular expression (#1357) [Dylan Thacker-Smith]default filter to handle false as value (#1144) [Mike Angell]BlockBody#blank? at parse time (#1287) [Dylan Thacker-Smith]Document#unknown_tag (#1290) [Dylan Thacker-Smith]where filter (#1026) [Samuel Doiron]ParseTreeVisitor to iterate the Liquid AST (#1025) [Stephen Paul Weber]strip_html performance (#1032) [printercu]line_number on String node when rescuing a render error. (#860) [Dylan Thacker-Smith]reversed on for block tag (#843) [Mark Crossfield]assert_equal nil with assert_nil (#895) [Dylan Thacker-Smith]collection_name and variable_name reader to For block (#909)at_least and at_most filters (#954, #958) [Nithin Bekal]#each_with_index with #each (#992) [Ashwin Maroli]BigDecimal.new to BigDecimal (#1024) [Koichi ITO]join filter on non String joiners (#857) [Richard Monette]Liquid::Strainer.add_filter method (#861)escape, url_encode, url_decode not handling non-string values (#898) [Thierry Joyal]strict_variables [Pascal Betz]sort and sort_natural to handle arrays with nils (#930) [Eric Chan]before_method to liquid_method_missing (#661) [Thierry Joyal]liquid_methods (See https://github.com/Shopify/liquid/pull/568 for replacement)index0 key in TableRow tag (#502) [Alfred Xing]super followed by your code. See #446 [Dylan Thacker-Smith]Liquid::ArgumentError instead of ::ArgumentError when filter has wrong number of arguments #309 [Bogdan Gusiev]Security fix, cherry-picked from master (4e14a65):
IMPORTANT: Liquid 2.6 is going to be the last version of Liquid which maintains explicit Ruby 1.8 compatability. The following releases will only be tested against Ruby 1.9 and Ruby 2.0 and are likely to break on Ruby 1.8.
Security fix, cherry-picked from master (4e14a65):
Yanked from rubygems, as it contained too many changes that broke compatibility. Those changes will be on following major releases.
assignmodulo filterquoted['references'] in tablerowtablerowstrip_html filter removes html commentsdate filterraw tag that suppresses parsingelse option to for tagincrement tagsplit filterAdded 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]