Commit Graph
252 Commits
Author SHA1 Message Date
Dylan Thacker-Smith 23203c0122 Fix some old templates that abused colon as an argument separator.
This is a fallback for keyword argument parsing since this feature broke
old templates that accidentally used a colon as a filter argument
separator.
2013-05-21 17:47:46 -04:00
Tom Burns 27fe76c0dd Merge pull request #192 from Shopify/revert_utf8
Revert "Merge pull request #185 from ISSIntel/liquid-utf8"
2013-05-21 14:46:17 -07:00
Tom Burns 8913a5615a Revert "Merge pull request #185 from ISSIntel/liquid-utf8"
This reverts commit c5dfcd29b0, reversing
changes made to f7d1e1d0c1.
2013-05-20 19:53:13 -04:00
Dylan Thacker-Smith 690b3ff27f Merge pull request #135 from astathopoulos/preserve_filters_ordering
Use array instead of Hash to keep the registered filters
2013-05-17 05:25:07 -07:00
Tasos Stathopoulos 8c1bbfec57 Use array instead of Hash to keep the registered filters
1.8.7 compatibility fix

In Ruby 1.8.7, Hash does not preserve insertion ordering as Array does.
This could cause a problem when registering filters which depend on others and
the registration order is important.

So, the @@filters variable was changed to array where the order of the filters is
the same as the insertion order.
2013-05-17 14:12:57 +03:00
Tom Burns c5dfcd29b0 Merge pull request #185 from ISSIntel/liquid-utf8
Liquid UTF-8 support
2013-04-23 10:29:49 -07:00
Ozéias Sant'ana f9c289372d Merge branch 'master' into liquid-utf8
Conflicts:
	lib/liquid/variable.rb
2013-04-23 13:10:16 -03:00
Dylan Smith f7d1e1d0c1 Release 2.5.0 v2.5.0 2013-03-06 10:51:06 -05:00
Dylan Smith 28fd2222c8 Merge branch 'remove-symbolizing' 2013-03-05 16:33:56 -05: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
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 a48e162237 Change Drop method lookup to not hit respond_to?
Class.public_method_defined? ends up diving into Ruby's core looking for
a method with the given method_or_key. This process at some point turns
method_or_key into a Symbol. This change no longer takes that path and
thus doesn't grow the Symbol table.
2013-01-16 11:07:48 -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 50bd34fd78 Merge pull request #161 from Shopify/fix-filter-parser-regex
Fix filter parser regex for filter args without separating spaces.
2012-12-18 10:13:21 -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
Tobias Lütke 05d9976e16 fix benchmark 2012-10-29 16:47:57 -04:00
Tom Burns 6c2fde5eea Instantiate blank string once instead of at every comparison 2012-10-25 11:54:19 -04:00
Tobias Lütke ce76dbf8d9 fixed the performance suite 2012-10-20 10:53:53 -04:00
Steven Soroka 661ff2ccdf Merge pull request #140 from binarycleric/feature/break_for_loop
Added break and continue statements
2012-08-21 13:22:24 -07: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
Jonathan Rudenberg bf86459456 Merge pull request #139 from pjb3/fix_block_test_name
Class name does not match file name
2012-08-19 15:07:59 -07:00
Paul Barry d2827c561b Class name does not match file name 2012-08-19 07:44:35 -04:00
Tobias Lütke 16c34595a4 fix mergeconflict 2012-08-07 13:21:31 -04:00
Tobias Lütke 6e091909ee Merge branch 'master' of github.com:Shopify/liquid 2012-08-07 13:20:37 -04:00
Tobias Lütke d7cb39ccb3 release 2.4.0 2012-08-07 13:20:23 -04:00
Jonathan Rudenberg f8d46804fd Fix rake test for broken version of rake on travis 2012-08-07 09:49:55 -04:00
Jonathan Rudenberg 5c6de2d919 Fix typo 2012-08-07 09:37:19 -04:00
Jonathan Rudenberg a8e9327f0b Update HISTORY.md for v2.4.0 release v2.4.0 2012-08-07 09:32:38 -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 6ebdded8f2 Merge branch 'issue_1650_strip_html_ignore_comments' 2012-06-11 10:33:00 -04:00
Jason Normore 515b31158e strip_html to ignore comments with html tags. fixes #1650 2012-06-11 10:32:12 -04:00
7ransandJason Normore 40cc799f3d Add example to split filter. 2012-06-11 10:32:12 -04:00
Daniel SchierbeckandJason Normore 5ac91e0837 Fix typo and add punctuation 2012-06-11 10:32:12 -04:00
Jonathan Rudenberg f6cb54fa59 Merge pull request #93 from trans/master
Split Filter Example
2012-06-07 12:21:40 -07:00
Jonathan Rudenberg 1606b4b705 Merge pull request #118 from dasch/patch-1
Fix typo and add punctuation
2012-06-07 12:20:54 -07:00
Jonathan Rudenberg 7cfd0f15d1 Merge pull request #128 from andmej/patch-1
Tpyo.
2012-06-07 12:18:09 -07:00
Jonathan Rudenberg 25ba54fc52 Enable 19mode for travis rbx/jruby 2012-06-07 15:16:58 -04:00
Jonathan Rudenberg 1aff63ff57 Merge pull request #107 from amateurhuman/syntax-error-fixes-for-rubinius
Fix syntax error in htmltags.rb and for.rb for compatibility with rbx-2.0.0-dev (1.9.3)
2012-06-07 12:14:35 -07:00
Jonathan Rudenberg 08fdcbbf65 Merge pull request #120 from infospace/interpolate_regex_once
add interpolate once flag to regexes that never change
2012-06-07 12:06:57 -07:00
Jonathan Rudenberg 2dba9ed0ea Merge pull request #113 from arika/improve-process-time
apply "o" option to regexps to improve process time
2012-06-07 12:04:28 -07:00
Andrés Mejía 6d02d59fbd Tpyo. 2012-06-06 22:32:42 -05:00
Michael Green 281e3ea9c8 add interpolate once flag to regexes that never change 2012-05-08 16:27:50 -07:00
Daniel Schierbeck b51b30fac1 Fix typo and add punctuation 2012-05-03 14:16:06 +03:00
akira yamada 84ed3d9964 apply "o" option to regexps to improve process time 2012-04-02 19:31:55 +09:00