Commit Graph

321 Commits

Author SHA1 Message Date
Ozéias Sant'ana
f9c289372d Merge branch 'master' into liquid-utf8
Conflicts:
	lib/liquid/variable.rb
2013-04-23 13:10:16 -03:00
Jay Strybis
a556ae6c26 Add reverse filter 2013-03-07 16:29:39 -06:00
Dylan Smith
9913895b81 Merge branch 'master' into remove-symbolizing
Conflicts:
	lib/liquid/variable.rb
2013-03-05 15:25:11 -05:00
Dylan Smith
d706db3bd7 Add support for filter keyword arguments. Closes #175 2013-03-05 15:17:14 -05:00
wǒ_is神仙
17dd85868d add tests for replace filter 2013-02-21 10:52:46 +08:00
Dylan Smith
38b4543bf1 Use sets to check if methods are invokable without symbolizing. 2013-02-05 14:45:08 -05:00
Jason Roelofs
1300210f05 Convert Strainer to white-list method protection
After moving the method existence check from Context into Strainer,
updated Strainer to only accept invokation methods that were added via
filter Modules, and done in a way that respond_to? is never called,
preventing unconstrained Symbol table growth.
2013-01-16 11:14:01 -05:00
Jason Roelofs
7bcb565668 Remove #to_sym calls from Drop and Variable
Symbols are not needed here and using plain strings is nicer on Ruby
2013-01-16 09:46:17 -05:00
Jason Roelofs
c3e6cde67f Add security tests to show that the symbol table doesn't grow 2013-01-16 09:46:17 -05:00
Adam Tanner
0b36540b78 Liquid has UTF8 support. 2012-12-26 18:14:36 -08:00
Dylan Smith
ee41b3f4a3 Fix filter parser regex for filter args without separating spaces.
The regex was using \S+ to match the comma between the filters
arguments, but would continue to match idependent quote characters and
filter separators. This can result in multiple filters being interpreted as
a single one with many arguments.
2012-12-18 01:23:31 -05:00
Jon Daniel
9c183bea83 added interrupt class for continue/break statements
When a continue or break statement is executed it pushes an interrupt to a
stack in context. If any non-handled interrupts are present blocks will cease
to execute. The for loop can handle the most recent interrupt in the stack.
2012-08-21 13:14:27 -04:00
Jon Daniel
484fd18612 added break and continue tags 2012-08-21 00:00:02 -04:00
Paul Barry
d2827c561b Class name does not match file name 2012-08-19 07:44:35 -04:00
Dylan Smith
f5a20ff8e8 Fix a regression in tablerow limit parameter.
I had accidentally read slice_collection_using_each as using to as an
inclusive limit rather than exclusive, and no tests covered the offset or
limit parameters.
2012-06-21 14:56:05 -04:00
Dylan Smith
d0184555d9 Allow tablerow to work with any Enumerable. Closes #132 2012-06-20 11:07:11 -04:00
Jason Normore
515b31158e strip_html to ignore comments with html tags. fixes #1650 2012-06-11 10:32:12 -04:00
Jeremy Friesen
740cd6e762 Merge branch 'master' of git://github.com/Shopify/liquid
* 'master' of git://github.com/Shopify/liquid:
  * Seperated 'Howto' into 'How to'. * Added periods to the second list as the first item has them. I guess I'm anally retentive like that. :)
  Fix conditions using negative number comparisons
2012-04-19 10:59:44 -04:00
Jeremy Friesen
5d0004a87e Added tests to verify that {{ 'now' | date :'%Y' }} and {{ 'today' | date :'%Y' }} work.
In the case of Ruby 1.9.3, 'now' is no longer parsed.  For safe
measures, I've added 'today' as well.
2012-04-19 10:48:55 -04:00
Dennis Theisen
0e3b522fe2 Fix conditions using negative number comparisons 2012-03-12 16:38:34 -04:00
Dennis Theisen
3d7c1c80a0 Ruby 1.8 compatibility fix: Ensure for-loop on an empty string does not enter for-body. 2012-02-29 14:41:21 -05:00
Dennis Theisen
1b2d0198ea Added backwards compatibility test for tablerow tag update
* Follow up to 043d816
2012-02-22 14:30:19 -05:00
Dennis Theisen
043d816460 Fix tablerow block to work with collection names in quoted syntax.
* Allows e.g. {% tablerow product in collections['frontpage'] %} instead of only collections.frontpage
2012-02-22 12:45:38 -05:00
Jo Liss
4a2bbafeb4 Make strip_html strip tags spread across lines 2012-02-16 15:42:10 +01:00
Kristian PD
58ad90677b Clarified compatibility comments, removed unused var from tag test. 2012-01-20 17:22:23 -05:00
Kristian PD
2b04590d4b Revert "Revert "Added backwards compatibility for 1.8.7 String.each returning itself (and 1.9.3 not supporting .each).""
This reverts commit bce0033c65.
2012-01-20 16:54:26 -05:00
Kristian PD
bce0033c65 Revert "Added backwards compatibility for 1.8.7 String.each returning itself (and 1.9.3 not supporting .each)."
This reverts commit 01dea94671.
2012-01-20 16:47:34 -05:00
Kristian PD
01dea94671 Added backwards compatibility for 1.8.7 String.each returning itself (and 1.9.3 not supporting .each).
Moved for tag tests to their own test model from StandardTagTest.
2012-01-20 16:45:41 -05:00
Tobias Lütke
1a1b4702d7 Merge pull request #80 from ROFISH/master
Add Filters to Assign
2011-12-20 13:58:05 -08:00
Jonathan Rudenberg
c4d713b6bb Add modulo filter 2011-11-17 14:08:57 -05:00
Ryan Alyea
975b17b529 Allow filters in assign.
A simple attempt, but basically it shifts the parsing of the right hand side of the assign from a simple context lookup to using the Variable parser (that includes filters). Fixes #79.
2011-11-01 01:46:26 -07:00
Jonathan Rudenberg
05a20c627d Clean up test suite 2011-10-15 20:04:27 -04:00
Jonathan Rudenberg
487b240404 Fix another drop call regression 2011-10-14 11:21:22 -04:00
Jonathan Rudenberg
cdf7f5b6a7 Fix UTC time for Travis 2011-10-13 12:00:42 -04:00
Jonathan Rudenberg
8b5cf73ccc Fix regression with calling a drop with a empty string 2011-10-13 11:47:23 -04:00
7rans
4971b9e9bc Remove comment about stripping split results. 2011-09-01 12:03:27 -04:00
7rans
da34d27258 Add test for split filter. 2011-08-31 22:20:45 -04:00
Tobias Lütke
352f83a9d2 Merge pull request #28 from mcr/mcr_inc_tag
increment tag
2011-07-01 11:48:13 -07:00
Tobias Lütke
410cce9740 Merge pull request #56 from oozou/for-else
For-else !!!
2011-07-01 11:42:17 -07:00
Jonathan Rudenberg
f85bea2902 Remove literal tag (raw is more performant)
This reverts commit c00a650492.
2011-06-13 09:34:15 -04:00
Jonathan Rudenberg
17922273e1 Merge old Shopify/liquid 2011-06-13 09:31:31 -04:00
Jonathan Rudenberg
4087a94d88 Add raw tag. Fixes #37.
Thanks to phaer: https://gist.github.com/1020852

YO DAWG, WE HEARD YOU LIKE LIQUID

SO WE PUT A RAW TAG IN YOUR LIQUID
SO YOU CAN HAVE LIQUID IN YOUR LIQUID
2011-06-12 11:15:16 -04:00
Steven Soroka
888cbe8f09 fix next if /^__.+__$/ to /^(__.+__|object_id)$/, since object_id will complain if it is removed 2011-04-28 15:24:50 -05:00
Steven Soroka
2f11364417 make ruby-debug optional 2011-04-28 15:18:59 -05:00
Steven Soroka
74cdfc6718 Fix commit 7bbb4ff84f so it's backwards-compatible 2011-04-28 15:18:51 -05:00
Prathan Thananart
8319d78c2e Added a failing test case for for-else 2011-04-28 12:00:21 +07:00
Tobias Lütke
bc55c4d348 Merged pull request #34 from claco/date-epoch.
Epoch support
2011-04-25 09:03:30 -07:00
Tobias Lütke
ab556cbdd9 Merged pull request #54 from mhw/fix-drop-numeric-parameter.
Fix passing numeric parameter to drops
2011-04-25 08:59:10 -07:00
Steven Soroka
59a63e0fe5 fix failing test "recursively_included_template_does_not_produce_endless_loop", push needs to come before exception raise since pop is in ensure block and always happens. 2011-04-24 01:09:56 -05:00
Mark H. Wilkinson
662b2983fe Failing test for integer drop lookup. 2011-04-12 14:09:43 +01:00