Tanel Jakobsoo
8d5a907dc8
Fixed issue where "nil" value for "escape" filter breaks rendering
...
Closes #664
2015-11-06 16:32:02 +02:00
Florian Weingarten
74cc41ce74
Merge pull request #662 from nickpearson/keep-argument-error-backtrace
...
Keep original stack trace in Liquid::ArgumentError
2015-10-29 15:24:54 +01:00
Thierry Joyal
a120cc587a
Merge pull request #661 from Shopify/rename-before-method-as-dynamic-method
...
Rename before_method as liquid_method_missing
2015-10-29 09:49:15 -04:00
Nick Pearson
c582023321
Keep original stack trace in Liquid::ArgumentError
2015-10-29 08:15:37 -05:00
Thierry Joyal
ac041c4ad1
Rename before_method as liquid_method_missing
2015-10-28 17:28:19 +00:00
Justin Li
31d7682f4e
Update history to reflect merge of #658
...
[ci skip]
2015-10-21 12:50:12 -04:00
Justin Li
5f1acbc086
Merge pull request #658 from Shopify/url_decode-filter
...
Merge pull request 658
2015-10-21 12:49:14 -04:00
Justin Li
8612716129
Remove rescue in unescape filter
2015-10-21 02:01:21 -04:00
Larry Archer
e6392d1cc1
Tests for new url_decode filter
2015-10-21 01:58:22 -04:00
Larry Archer
04381418d3
Add url_decode filter to accompany url_encode
2015-10-21 01:58:22 -04:00
Justin Li
89ccdabe9a
Merge pull request #655 from dijonkitchen/patch-1
...
Rename MIT-LICENSE to LICENSE
2015-10-14 12:08:37 -04:00
Jonathan Chen
c0fc6777b0
Rename MIT-LICENSE to LICENSE
...
Standard name format
2015-10-14 12:06:08 -04:00
Justin Li
cd03346239
Update history to reflect merge of #652
...
[ci skip]
2015-09-29 21:06:21 -04:00
Justin Li
b4f19da127
Merge pull request #652 from mcary/empty-array-sort
...
Merge pull request 652
2015-09-29 21:05:10 -04:00
Marcel M. Cary
4100f8d641
Fix "sort" filter on empty array to return empty array
...
When sorting an empty array with the "sort" filter, it returns nil
instead of []. This confuses subsequent filters in the chain that
expect an array. For example, when followed by the "map" filter, it
produces an array containing one nil element: [nil].
I could special-case the nil return value, but that would be more
cumbersome than making sure "sort" always returns an array.
Add a case to the "sort" method to return [] if the array is empty,
before performing any checks on ary.first that assume a non-empty array.
There is still a danger of returning nil if the first item in the array
is nil and it is non-empty, but I'm not sure how better to handle that
case.
Apply a similar fix to sort_natural, uniq, and compact filters.
2015-09-29 10:24:31 -07:00
Dylan Thacker-Smith
d8bda2c892
Merge pull request #653 from Shopify/fix-rubocop-offenses
...
Fix offenses from the new version of rubocop.
2015-09-25 19:48:09 -04:00
Dylan Thacker-Smith
4f81c0a658
Lock rubocop version to avoid CI failures from new releases.
2015-09-25 19:42:35 -04:00
Dylan Thacker-Smith
704937bc00
Fix offenses from the new version of rubocop.
2015-09-25 19:34:44 -04:00
Justin Li
27c6b8074a
Update history to reflect merge of #610
...
[ci skip]
2015-08-03 20:51:41 -04:00
Justin Li
affae5ebef
Merge pull request #610 from boobooninja/gf3
...
Merge pull request 610
2015-08-03 20:50:14 -04:00
Florian Weingarten
fc1c0d0d83
Merge pull request #632 from knu/fix_date_error
...
Properly rescue ::ArgumentError in the date filter
2015-07-24 10:50:52 -04:00
Akinori MUSHA
a215b70de9
Properly rescue ::ArgumentError in the date filter
2015-07-24 13:35:06 +09:00
Justin Li
1f70928f8a
Update history to reflect merge of #631
...
[ci skip]
2015-07-23 17:07:40 -04:00
Justin Li
7713f6709d
Update history for 3.0.5
2015-07-23 17:06:12 -04:00
Justin Li
239cf0e5f5
Update history for 2.6.3
2015-07-23 17:05:58 -04:00
Dylan Thacker-Smith
fa187665b3
Merge pull request #631 from Shopify/fix-tz-test-failure
...
Fix a timezone test failure.
2015-07-23 16:34:48 -04:00
Dylan Thacker-Smith
cd0c5e954c
Fix a timezone test failure.
2015-07-23 16:19:59 -04:00
Florian Weingarten
490b457738
Merge pull request #626 from Shopify/fix_bracket_thing
...
Fix bracket thing
2015-07-17 17:19:06 +02:00
Florian Weingarten
4d6dec9b5a
Fix chained access to multi-dimensional hash
2015-07-17 10:10:00 -04:00
Loren Hale
0b11b573d9
add global_filter
...
add a global filter using a proc
only add one proc and not an array
add tests to make sure the global_filter is applied after native filters
2015-07-12 16:46:43 +08:00
Justin Li
b42d35ff36
Merge pull request #620 from Shopify/accept-invalid-range-args
...
Add param to accept invalid input in to_integer
2015-07-09 13:24:28 -04:00
Justin Li
b4e133e26f
Fix regression in range lookup
2015-07-09 13:21:46 -04:00
Justin Li
1f9bd1d809
Add param to accept invalid input in to_integer
2015-07-09 13:18:06 -04:00
Justin Li
e88be60818
Merge pull request #618 from Shopify/move-reraise-for-line-number
...
Move the syntax error rescue for adding error line numbers.
2015-07-09 11:42:41 -04:00
Dylan Thacker-Smith
14416b3c49
Move the syntax error rescue for adding error line numbers.
2015-07-09 11:25:05 -04:00
Dylan Thacker-Smith
bde14a650d
Merge pull request #617 from Shopify/rename-options-iv
...
Rename options instance variable in Variable and Tag.
2015-07-08 20:50:20 -04:00
Dylan Thacker-Smith
c535af021a
Rename options instance variable in Variable and Tag.
2015-07-08 19:59:44 -04:00
Dylan Thacker-Smith
9c9345869b
Merge pull request #614 from Shopify/remove-token-class
...
Implement line numbers without the Liquid::Token class.
2015-07-08 19:48:55 -04:00
Dylan Thacker-Smith
73834a7e52
Use reject rather than dup and delete.
2015-07-08 19:27:24 -04:00
Dylan Thacker-Smith
c45310170b
Use parse_context or options instead of @options.
2015-07-08 19:21:59 -04:00
Dylan Thacker-Smith
920e1df643
Rescue and re-raise syntax errors in Template#parse to add line numbers.
...
This can be done now that the parse context has the line number
information, so it doesn't need to be added on closer to the original
exception. This has the advantage of not having to rescue and re-raise the
exception multiple times, and simplifies liquid-c which would otherwise
have to rescue the exception in BlockBody#parse.
2015-07-08 19:21:59 -04:00
Dylan Thacker-Smith
cebf75b8d7
Implement line numbers without the Liquid::Token class.
2015-07-08 19:21:59 -04:00
Justin Li
afda01adbb
Merge pull request #616 from Shopify/handle-non-int-range-args
...
Handle non-int range lookup arguments
2015-07-08 17:47:27 -04:00
Justin Li
959cd6d2a2
Temporarily disable rubinius in CI
...
It takes much longer than the others and is currently broken
2015-07-08 17:47:05 -04:00
Justin Li
4c1b89e20e
Add regression test for ranges on non-integer types
2015-07-08 17:41:18 -04:00
Justin Li
83b6dd0268
Use to_integer for range lookup arguments
2015-07-08 17:37:07 -04:00
Justin Li
6fb402e60d
Move to_integer, to_date, and to_number to Liquid::Utils
2015-07-08 17:33:05 -04:00
Dylan Thacker-Smith
338287df5e
Merge pull request #613 from Shopify/taint-context-warning
...
Add taint warnings to the context rather than the template.
2015-07-07 16:23:10 -04:00
Dylan Thacker-Smith
c4c398174b
Use early returns rather than large if in Variable#taint_check
2015-07-07 15:56:03 -04:00
Dylan Thacker-Smith
80b6ac3bc7
Add taint warnings to the context rather than the template.
2015-07-07 15:53:02 -04:00