Dylan Thacker-Smith
bdb9a4a47f
Remove nil and empty string check in invoke_drop.
2015-11-09 15:03:36 -05:00
Dylan Thacker-Smith
c38eec0293
Merge pull request #665 from tanelj/escape_filter_nil_fix
...
Fixed issue where "nil" value for "escape" filter breaks rendering
2015-11-06 10:54:48 -05: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
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
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
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
Dylan Thacker-Smith
15974d9168
Merge pull request #612 from Shopify/fix-block-body-naming
...
Use node to refer to objects from the nodelist rather than token.
2015-07-07 15:49:58 -04:00
Dylan Thacker-Smith
f22ab4358b
Merge pull request #611 from Shopify/no-escape-rescue
...
Remove standard exception rescue in escape filter.
2015-07-07 15:49:43 -04:00
Dylan Thacker-Smith
fad3b8275c
Use node to refer to objects from the nodelist rather than token.
2015-07-04 20:57:35 -04:00
Dylan Thacker-Smith
5a071cb7f2
Remove standard exception rescue in escape filter.
2015-07-04 13:48:25 -04:00
Dylan Thacker-Smith
6968def5dd
Merge pull request #574 from Shopify/template-name-in-errors
...
Include template name with line numbers in render errors.
2015-06-04 15:28:12 -04:00
Dylan Thacker-Smith
ad3748af21
Include template name with line numbers in render errors.
2015-06-04 13:44:01 -04:00
Dylan Thacker-Smith
b79c0c611c
Merge pull request #586 from Shopify/string-contains-non-string
...
Avoid an exception from checking if a string contains a non-string.
2015-06-03 10:58:38 -04:00
Dylan Thacker-Smith
8a2947865b
Avoid an exception from checking if a string contains a non-string.
2015-06-03 02:21:51 -04:00
Dylan Thacker-Smith
ea29f8b4b8
Merge pull request #583 from Shopify/slice-nil-offset
...
Raise a Liquid::ArgumentError in slice filter for invalid integers.
2015-06-03 01:43:56 -04:00
Dylan Thacker-Smith
c84f4520cc
Keep input out of error message and add test for slice Integer parsing.
2015-06-03 01:35:01 -04:00
Dylan Thacker-Smith
3dd6433e2f
Merge pull request #584 from Shopify/replace-non-string
...
Convert arguments to replace filters to strings to avoid exceptions.
2015-06-02 16:41:15 -04:00
Dylan Thacker-Smith
ab7109a335
Raise a Liquid::ArgumentError in slice filter for invalid integers.
2015-06-02 16:05:08 -04:00
Dylan Thacker-Smith
94fe050952
Convert arguments to replace filters to strings to avoid exceptions.
2015-06-02 15:59:29 -04:00
Dylan Thacker-Smith
27245c9eab
Merge pull request #577 from Shopify/table-row-blank-string-collection
...
Fix exception from using an empty string for the table row collection.
2015-05-28 16:20:42 -04:00
Dylan Thacker-Smith
c1eb694057
Remove the redundant iterable check in the for tag.
...
Just do it in slice_collection for consistency with the tablerow tag.
2015-05-28 16:04:50 -04:00
Dylan Thacker-Smith
f53b31c867
Merge pull request #578 from Shopify/filter-error-handling
...
Handle some more standard filter errors.
2015-05-28 15:00:57 -04:00
Dylan Thacker-Smith
363388e92f
Handle some more standard filter errors.
2015-05-28 14:18:53 -04:00
Dylan Thacker-Smith
873eddbb85
Split a line and use String#empty? for readability
2015-05-28 12:55:04 -04:00
Dylan Thacker-Smith
e790b60f60
Fix exception from using an empty string for the table row collection.
2015-05-28 12:11:39 -04:00
Dylan Thacker-Smith
3264d60425
Merge pull request #576 from Shopify/flexible-exception-handler
...
Allow the exception handler to convert exceptions to hide error messges
2015-05-28 11:38:44 -04:00
Dylan Thacker-Smith
8ff1b8e01f
Test set_line_number_from_token after exception is converted.
2015-05-28 09:22:02 -04:00
Dylan Thacker-Smith
8d5e71f856
Allow the exception handler to convert exceptions to hide error messages.
2015-05-27 18:59:51 -04:00
Dylan Thacker-Smith
89c6e605f8
Merge pull request #575 from Shopify/zero-division-error
...
Raise Liquid::ZeroDivisionError instead of ZeroDivisionError.
2015-05-26 10:43:23 -04:00
Dylan Thacker-Smith
6265c36ec9
Raise Liquid::ZeroDivisionError instead of ZeroDivisionError.
2015-05-25 15:40:17 -04:00
Dylan Thacker-Smith
8af99ff918
Merge pull request #573 from Shopify/optional-error-rendering
...
Make liquid error rendering optional.
2015-05-25 12:11:10 -04:00
Dylan Thacker-Smith
36200ff704
Make liquid error rendering optional.
...
Although the author of the liquid template wants to see these errors, they
probably don't want the visitor to see the liquid errors. Probably the
best fallback when rendering the page for visitors is to render the empty
string for tags with errors.
2015-05-25 11:24:53 -04:00
Dylan Thacker-Smith
63eb1aac69
Merge pull request #519 from Shopify/remove-filter-method-blacklist
...
Allow filters to redefine Object methods to make them invokable.
2015-02-04 18:07:51 -05:00
Dylan Thacker-Smith
950f062041
Allow filters to redefine Object methods to make them invokable.
2015-02-03 13:51:33 -05:00
Dylan Thacker-Smith and Justin Li
2fd8ad08c0
Remove unused local variable that was accidentally added.
2014-11-03 17:07:42 -05:00
Dylan Thacker-Smith and Justin Li
15e1d46125
Avoid storing options instance variable in BlockBody.
...
There is no need to pass parse options to the BlockBody initializer, since
it does all the parsing in the parse method, unlike tags which parse the
tag markup in the initializer.
2014-11-03 17:07:42 -05:00
Dylan Thacker-Smith and Justin Li
73fcd42403
Create a BlockBody class to decouple block body parsing from tags.
2014-11-03 17:07:42 -05:00
Dylan Thacker-Smith
d9ae36ec40
Merge pull request #466 from Shopify/remove-expression-cache
...
Remove expression cache
2014-10-20 13:57:17 -04:00
Dylan Thacker-Smith
b9ac3fef8f
Remove the quotes from the partial string in the profiler timing objects.
2014-10-18 16:26:18 -04:00
Dylan Thacker-Smith
f5faa4858c
Remove parsed expression cache.
2014-10-18 15:03:40 -04:00
Dylan Thacker-Smith
bc5e444d04
Use Expression.parse and Context#evaluate in the Include class.
2014-10-18 15:03:40 -04:00
Dylan Thacker-Smith
3a4b63f37e
Use Expression.parse and Context#evaluate in the TableRow class.
2014-10-18 15:03:40 -04:00
Dylan Thacker-Smith
a1a128db19
Refactor Condition so that it takes a parsed expression.
2014-10-18 15:03:40 -04:00
Dylan Thacker-Smith
d502b9282a
Use Expression.parse and Context#evaluate in the For class.
2014-10-18 15:03:36 -04:00
Dylan Thacker-Smith
fee8e41466
Use Expression.parse and Context#evaluate in the Cycle class.
2014-10-18 14:27:58 -04:00
Dylan Thacker-Smith
37260f17ff
Use Expression.parse and Context#evaluate in the Condition class.
2014-10-18 14:27:58 -04:00
Dylan Thacker-Smith
6d080afd22
Merge pull request #446 from Shopify/remove-end-tag
...
Remove unused Block#end_tag method.
2014-10-14 03:03:31 -04:00
Dylan Thacker-Smith
a67e2a0a00
Remove unused Block#end_tag method.
...
Although the method is called, it is defined with an empty body and not
overridden to do anything else.
2014-10-14 02:58:11 -04:00
Dylan Thacker-Smith
f387508666
Parse expressions in Liquid::Variable#parse.
2014-10-08 21:06:59 -04:00
Dylan Thacker-Smith
d84870d7a5
Test line number of errors in nested blocks.
2014-10-03 16:25:12 -05:00
Dylan Thacker-Smith
b79c9cb9bf
Merge pull request #453 from Shopify/no-modify-default-resource-limit
...
Avoid modifying the default resources limits hash.
2014-10-01 19:02:09 -05:00
Dylan Thacker-Smith
cf5ccede50
Avoid modifying the default resources limits hash.
2014-10-01 18:51:06 -05:00
Dylan Thacker-Smith
638455ed92
Merge pull request #448 from Shopify/remove-unused-filter-not-found-error
...
Remove Liquid::FilterNotFoundError since it is never raised.
2014-09-15 17:43:33 -04:00
Dylan Thacker-Smith
b2a74883e9
Remove Liquid::FilterNotFoundError since it is never raised.
2014-09-15 17:42:07 -04:00
Dylan Thacker-Smith
6875e5e16f
Merge pull request #449 from Shopify/fix-flaky-total-render-time-test
...
Fix flaky test which assumes total_render_time can't be 0.
2014-09-15 17:41:41 -04:00
Dylan Thacker-Smith
a5717a3f8d
Fix flaky test which assumes total_render_time can't be 0.
...
jruby has millisecond precision for Time.now, so total_render_time can be 0
due to this lack of precision.
2014-09-15 17:26:55 -04:00
Dylan Thacker-Smith
804fcfebd1
Merge pull request #444 from Shopify/remove-block-children
...
Avoid keeping track of two lists of nodes during parsing.
2014-09-15 09:56:08 -04:00
Dylan Thacker-Smith
b37ee5684a
Merge pull request #445 from Shopify/prefer-super-over-render-all
...
Use super rather than render_all in single block render classes.
2014-09-15 09:53:54 -04:00
Dylan Thacker-Smith
0573b63b4c
Use super rather than render_all in single block render classes.
2014-09-12 16:58:07 -04:00
Dylan Thacker-Smith
29c21d7867
Avoid keeping track of two lists of nodes during parsing.
2014-09-12 16:43:00 -04:00
Dylan Thacker-Smith
478eb893a9
Merge pull request #439 from Shopify/default-resource-limits
...
Make it easy to set default resource limits.
2014-09-11 14:27:52 -04:00
Dylan Thacker-Smith
eae29f8c48
Make it easy to set default resource limits.
2014-09-11 13:54:30 -04:00
Dylan Thacker-Smith
d3b113d2e1
Merge pull request #391 from Shopify/extract-context-parse
...
Separate expression parsing and rendering from Context#[]
2014-08-11 14:17:54 -07:00
Dylan Thacker-Smith
2aa9bbbac2
Separate expression parsing and rendering from Context#resolve.
2014-08-11 14:15:58 -07:00
Dylan Thacker-Smith
af0e26fb16
Merge pull request #337 from Shopify/remove-rails-dev-dependancy
...
Remove active_support from the development dependancies.
2014-04-11 15:08:34 -04:00
Dylan Thacker-Smith
f5502e8152
Remove active_support from the development dependancies.
2014-04-11 14:26:40 -04:00
Dylan Thacker-Smith
4c477c2087
Merge pull request #333 from Shopify/remove-liquid-view
...
Remove ActionView template handler
2014-03-31 10:16:37 -04:00
Dylan Thacker-Smith
cd7fc050b1
Remove ActionView template handler
...
Fixes #21
2014-03-29 15:59:42 -04:00
Dylan Thacker-Smith
8291c5e72c
Merge pull request #329 from Shopify/seperate-integration-tests
...
Separate unit and integration tests.
2014-03-26 16:04:39 -04:00
Dylan Thacker-Smith
7e45155aa9
Seperate unit and integration tests.
...
This makes it easier to re-use the integration tests in a seperate gem that
optimizes parts of liquid with a native implementation.
2014-03-26 15:47:07 -04:00
Dylan Thacker-Smith
f0afbc27e0
Add regression test for raw tags with open variable tags.
2014-03-24 10:01:03 -04:00
Dylan Thacker-Smith
fdf03076e0
Revert "Merge pull request #325 from Shopify/remove-variable-incomplete-end"
...
That pull request broke raw tags with open variable tags. E.g.
{% raw %}
{{
{% endraw %}
{{ 1 }}
This reverts commit fbaabf3b59 , reversing
changes made to af24d2c2ab .
2014-03-24 09:59:07 -04:00
Dylan Thacker-Smith
d1bfda15e3
Add profile:strict rake task.
2014-03-21 21:54:53 -04:00
Dylan Thacker-Smith
d8d9984a7b
Remove some unused regexes.
2014-03-21 15:50:14 -04:00
Dylan Thacker-Smith
fbaabf3b59
Merge pull request #325 from Shopify/remove-variable-incomplete-end
...
Allow quoted single curly braces in variables.
2014-03-21 13:48:47 -04:00
Dylan Thacker-Smith
7e0ef867d2
Make tag/variable termination error clearer.
2014-03-21 02:04:01 -04:00
Dylan Thacker-Smith
3682414cc4
Allow quoted single curly braces in variables.
2014-03-21 02:04:01 -04:00
Dylan Thacker-Smith
af24d2c2ab
Add missing PR reference and author to a History.md entry.
2014-03-21 02:03:31 -04:00
Dylan Thacker-Smith
4ee43bc5d2
Merge pull request #324 from Shopify/multiline-tags-and-vars
...
Allow newlines in tags and variables.
2014-03-21 00:26:14 -04:00
Dylan Thacker-Smith
1320a69fca
Merge pull request #323 from Shopify/render_bang_in_tests
...
Use render! in tests to make debugging test failures easier.
2014-03-20 18:33:40 -04:00
Dylan Thacker-Smith
3b14e27f55
Allow newlines in tags and variables.
2014-03-20 17:27:03 -04:00
Dylan Thacker-Smith
face33a137
Merge pull request #321 from Shopify/move-tag-parse-out-of-initialize
...
Refactor to create tags with a parse class method instead of new.
2014-03-20 16:15:58 -04:00
Dylan Thacker-Smith
d4ecaff8b8
Refactor to create tags with a parse class method instead of new.
...
By moving parse out of the initializer, we can call super at the start of
the initializers for subclasses, and avoid the nasty allocate hack.
2014-03-20 16:10:10 -04:00
Dylan Thacker-Smith
a5990042ff
Use render! in tests to make debugging test failures easier.
2014-03-20 12:04:17 -04:00
Dylan Thacker-Smith
4b5e41d04e
Merge pull request #322 from Shopify/use-render-bang-in-benchmarks
...
Use render! in benchmarks to avoid making it faster by breaking things.
2014-03-19 18:06:15 -04:00
Dylan Thacker-Smith
4b69f6ae83
Use render! in benchmarks to avoid making it faster by breaking things.
2014-03-19 18:01:33 -04:00
Dylan Thacker-Smith
b9feb415f6
Merge pull request #320 from Shopify/move-table-row-tag
...
Move definition for TableRow to the tags folder.
2014-03-18 17:16:32 -04:00
Dylan Thacker-Smith
92781ec43b
Move definition for TableRow to the tags folder.
2014-03-18 17:13:39 -04:00