Commit Graph
454 Commits
Author SHA1 Message Date
Justin Li de16db9b72 Don't allow - to end a variable name 2014-10-17 13:38:07 -04:00
Justin Li b4ea483c4e Separate ? and - into special tokens 2014-10-17 13:30:54 -04:00
Justin Li 7843bcca8d Merge pull request #443 from Shopify/completely-parse-variables
Parse expressions in Liquid::Variable#parse.
2014-10-17 13:12:46 -04:00
Florian Weingarten f9318e8c93 flat_map 2014-10-17 16:11:12 +00:00
Florian Weingarten 0fa075b879 Use pop over shift to avoid reverse 2014-10-15 19:26:39 +00: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
Florian Weingarten 584b492e70 Line numbers for all parse errors 2014-10-03 21:00:31 +00:00
Dylan Thacker-Smith cf5ccede50 Avoid modifying the default resources limits hash. 2014-10-01 18:51:06 -05:00
Evan Huus eeb061ef44 Address code review comments
- clean up comment wording
- fix potentially leaky tests
2014-09-16 17:23:26 +00:00
Evan Huus 1d151885be Auto-untaint variables passed through 'escape' 2014-09-16 17:23:26 +00:00
Evan Huus e836024dd9 Check and handle when a tainted variable is used 2014-09-16 17:23:26 +00:00
Dylan Thacker-Smith b2a74883e9 Remove Liquid::FilterNotFoundError since it is never raised. 2014-09-15 17:42:07 -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 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 eae29f8c48 Make it easy to set default resource limits. 2014-09-11 13:54:30 -04:00
Florian Weingarten debac5dd0b Revert "move line number check"
This reverts commit 939365c234.

Conflicts:
	lib/liquid/template.rb
2014-09-06 10:21:17 -04:00
Florian Weingarten ce06ed4bb1 merge conflicts 2014-09-05 14:16:20 +00:00
Florian Weingarten 939365c234 move line number check 2014-09-05 14:12:30 +00:00
Florian Weingarten c60fd0715d remove unnecessary nil 2014-09-05 14:12:30 +00:00
Florian Weingarten c83e1c7b6d prefix for Liquid::Error instances 2014-09-05 14:12:30 +00:00
Florian Weingarten aabbd8f1a1 remove unnecessary method 2014-09-05 14:12:30 +00:00
Florian Weingarten 60d8a213a5 Clean up Liquid::Error#render 2014-09-05 14:12:30 +00:00
Florian Weingarten 17cc8fdbb3 put line number in parentheses 2014-09-05 14:12:30 +00:00
Tristan HumeandFlorian Weingarten 27c1019385 Add line numbers to warnings 2014-09-05 14:12:30 +00:00
Tristan HumeandFlorian Weingarten 3a0ee6ae91 Remove parser switching duplication 2014-09-05 14:12:29 +00:00
Florian Weingarten 5eff375094 Optional line numbers for liquid errors 2014-09-05 14:12:29 +00:00
Tristan Hume 68af2d6e2a Pass options to include tags 2014-08-26 10:50:25 -04:00
Bogdan Gusiev 4e9d414fde Fixed condition constains operator with wrong data type
"contains" operator on wrong data type should not cause NoMethodError.
2014-08-18 17:32:29 +03:00
Derrick Reimer 0b847e553c Add url_encode standard filter 2014-08-15 08:45:40 -07:00
Florian Weingarten c2663258be Merge pull request #364 from collectiveidea/instrument-rendering-with-hooks
Profiling the rendering of a liquid template
2014-08-13 23:04:29 +02:00
Tristan Hume d4654d0062 Merge pull request #417 from Shopify/simplify-regex
Simplify Variable Parsing Regexes
2014-08-13 12:07:35 -04:00
Tristan Hume ffd4f9d959 Simplify secondary filter regex 2014-08-13 09:36:02 -04:00
Tristan Hume 292161865d Simplify filter parse regex 2014-08-13 09:28:01 -04:00
Florian Weingarten 1678c07548 Call to_liquid in Context invoke 2014-08-12 19:54:12 +00:00
Jason Roelofs 173a58d36a Profile liquid rendering
Add a simple profiling system to liquid rendering. Each
liquid tag ({{ }} and {% %}) is processed through this profiling,
keeping track of the partial name (in the case of {% include %}), line
number, and the time it took to render the tag. In the case of {%
include %}, the profiler keeps track of the name of the partial and
properly links back tag rendering to the partial and line number for
easy lookup and dive down. With this, it's now possible to track down
exactly how long each tag takes to render.

These hooks get installed and uninstalled on an as-need basis so by
default there is no impact on the overall liquid execution speed.
2014-08-12 15:37:21 -04:00
Dylan Thacker-Smith 2aa9bbbac2 Separate expression parsing and rendering from Context#resolve. 2014-08-11 14:15:58 -07:00
Tristan Hume 2809ec780a Pass through options on assign tag 2014-08-11 10:38:36 -04:00
Jean Boussier df6b442816 Cast input to string before spliting 2014-08-07 14:01:44 -04:00
Florian Weingarten fb6f9c1c13 Slice filter for arrays. 2014-08-05 17:59:31 +00:00
Florian Weingarten 66ae7f3ec0 Merge pull request #406 from Shopify/slice_filter
slice filter
2014-08-05 17:14:01 +02:00
Florian Weingarten 0bea31d2ef Use Integer() instead of to_i 2014-08-05 15:13:15 +00:00
Florian Weingarten e5b0487fef Merge pull request #312 from Shopify/uniq_filter
uniq filter
2014-08-05 16:22:48 +02:00
Florian Weingarten 9117722740 Use symbols in respond_to? 2014-08-05 14:22:11 +00:00
Florian Weingarten baea0a6bf7 slice filter 2014-08-04 16:47:08 +00:00
Tom Burns 794ca9f604 make the conditions around stack creation easier to read 2014-07-30 15:42:24 +00:00
Tom Burns 15f6cabf83 avoid a hash comparison 2014-07-30 15:12:22 +00:00
Tom Burns e53d102a2c use 'unless' instead of 'if !' for simple conditional 2014-07-30 14:59:56 +00:00
Florian WeingartenandFlorian Weingarten 33e7b8e373 uniq filter 2014-07-29 13:09:34 +00:00