Peter Zhu
ea4f1885f8
Instrument forloop.name
2020-11-12 14:19:12 -05:00
Peter Zhu
d844a3dd8b
Instrument usage of offset:continue in for loops
2020-11-12 13:39:02 -05:00
Max Melentiev
9fcba1a26c
Remove unused translation ( #1033 )
2020-11-11 10:21:04 -05:00
Peter Zhu
2ce577e36b
Instrument for bug #1346
2020-11-09 14:27:17 -05:00
Dylan Thacker-Smith
8f7f8761d1
Use Array#each instead of Array#inject to avoid an object allocation ( #1341 )
2020-10-29 11:24:19 -04:00
Justin Li
a3ff300419
Merge pull request #1330 from ashmaroli/exception-renderer-lambda
...
Stash exception_renderer lambda in a constant
2020-10-28 13:38:20 -04:00
Dylan Thacker-Smith
ea6e326b9c
Fix FrozenError for blank case tag with multiple expression when tag ( #1340 )
2020-10-28 13:37:17 -04:00
Ashwin Maroli
740f8759cc
Rename constant to RAISE_EXCEPTION_LAMBDA
2020-10-28 23:06:13 +05:30
Ashwin Maroli
bb9cd4eb6a
Merge upstream branch 'master' into this branch
2020-10-28 22:14:09 +05:30
Dylan Thacker-Smith
7754d5aef5
Attempt to strict parse variables before lax parsing in lax error mode ( #1338 )
2020-10-28 10:37:00 -04:00
Dylan Thacker-Smith
f23c2a83f2
Fix lax parsing expressions surrounded by spaces ( #1335 )
...
to make it compatible with strict parsing and liquid-c
2020-10-27 14:53:57 -04:00
Peter Zhu
61d54d1b19
Merge pull request #1331 from Shopify/pz-freeze-block
...
Freeze block body after parsing completes
2020-10-27 13:17:54 -04:00
Dylan Thacker-Smith
10ea6144e0
Add Liquid::ParseContext#parse_expression for liquid-c node disabling ( #1333 )
...
We would like to be able to disable liquid-c VM rendering at runtime,
but right now expression parsing is done using Expression.parse, which
isn't aware of the parse context. That prevents us from conditionally
compiling to VM code based on a parse option.
2020-10-27 11:00:04 -04:00
Peter Zhu
292d971937
Merge loops
2020-10-27 10:42:30 -04:00
Peter Zhu
5c082472a1
Address comments
2020-10-26 16:16:30 -04:00
Peter Zhu
0bedc71854
Address comments
2020-10-26 15:11:00 -04:00
Peter Zhu
fe66edb825
Freeze block body after parsing completes
2020-10-26 11:06:55 -04:00
Ashwin Maroli
bfa2df7036
Stash exception_renderer lambda in a constant
2020-10-26 19:44:00 +05:30
Ashwin Maroli
0e52706a5b
Remove redundant comment in Liquid::Template ( #1328 )
2020-10-22 12:49:02 -04:00
Justin Li
8e99b3bd7f
Merge pull request #1322 from ashmaroli/else-tag-names
...
Stash array of tag names in a constant
2020-10-21 12:09:14 -04:00
Dylan Thacker-Smith
001fde7694
Avoid allocating arrays of key value pairs for hashes in assign_score_of
2020-10-21 10:36:00 -04:00
Ashwin Maroli
b15428ea83
Stash array of tag names in a constant
2020-10-21 18:50:56 +05:30
Dylan Thacker-Smith
c9ad9d338c
Extract method for raising a syntax error in the assign tag for liquid-c ( #1321 )
2020-10-20 16:59:52 -04:00
Dylan Thacker-Smith
ae6bd9f6b0
Allow an empty variable tag during strict parsing for liquid-c compat ( #1320 )
2020-10-20 14:11:48 -04:00
Dylan Thacker-Smith
46fd63da5f
Fix strict parsing of find variable with a name expression
2020-10-19 12:17:25 -04:00
Dylan Thacker-Smith
420a1c79e1
Refactor variable lookup strict parsing to reduce coupling on dot lookup
2020-10-19 12:10:32 -04:00
Dylan Thacker-Smith
6d39050e1e
Use a case statement in Liquid::Parser#expression
2020-10-19 12:10:11 -04:00
Dylan Thacker-Smith
d250a7f502
Set Context#initialize instance variables before squashing assigns ( #1307 )
2020-10-06 21:00:08 -04:00
Peter Zhu
7aed2f122c
Refactor raising tag never closed to method
2020-10-06 15:55:55 -04:00
Peter Zhu
5199a34d9b
Merge pull request #1304 from Shopify/pz-raw-bug
...
Fix duplication of text in raw tags
2020-10-05 10:59:15 -04:00
Peter Zhu
4c2ab6f878
Fix bug in raw tags
2020-10-05 10:47:28 -04:00
Dylan Thacker-Smith
33760f083a
Extract rescue code from BlockBody#render_node for re-use in liquid-c
2020-09-25 11:24:39 -04:00
Dylan Thacker-Smith
a03f02789b
Only use MethodLiteral in condition expressions ( #1300 )
2020-09-25 11:10:33 -04:00
Dylan Thacker-Smith
ca4b9b43af
Port liquid-c bug compatible whitespace trimming ( #1291 )
2020-09-16 16:07:36 -04:00
Dylan Thacker-Smith
77084930e9
Bring back silencing of errors in blank nodes for backwards compatibility ( #1292 )
2020-09-15 10:35:18 -04:00
Dylan Thacker-Smith
0d02dea20b
Rename Liquid::Block#unknown_tag parameters for clarity
2020-09-11 09:33:12 -04:00
Dylan Thacker-Smith
86b47ba28b
Pass the tag markup and tokenizer to Document#unknown_tag
...
The parse_context no longer needs to be passed in because it is available
through through an attr_reader on the instance. However, the markup and
tokenizer weren't made available. This refactor also makes the parameters
given to Document#unknown_tag consistent with Block#unknown_tag.
2020-09-11 09:33:12 -04:00
Dylan Thacker-Smith
bbc56f35ec
Add ParseContext#new_block_body to centralize the liquid-c override point
2020-09-09 12:25:35 -04:00
Dylan Thacker-Smith
dfbbf87ba9
Use BlockBody from Document using composition rather than inheritence
...
This way liquid-c can more cleanly use a Liquid::C::BlockBody object
for the block body by overriding Liquid::Document#new_body.
2020-09-08 14:00:52 -04:00
Dylan Thacker-Smith
037b603603
Turn some Liquid::BlockBody methods into class methods for liquid-c
...
So they can be used from a Liquid::C::BlockBody
2020-09-08 14:00:48 -04:00
Dylan Thacker-Smith
bd33df09de
Provide Block#new_body so that liquid-c can override it
...
This way liquid-c can return a body of a different class that wraps
a C implementation.
2020-09-08 13:59:48 -04:00
Dylan Thacker-Smith
e1a2057a1b
Update assign_score during capturing
...
To stop long captures before they grow the heap more then they should.
2020-09-03 11:13:08 -04:00
Dylan Thacker-Smith
ae9dbe0ca7
Fix render length resource limit so it doesn't multiply nested output
2020-09-03 11:13:04 -04:00
Dylan Thacker-Smith
3b486425b0
Handle BlockBody#blank? at parse time ( #1287 )
2020-09-03 11:07:13 -04:00
Dylan Thacker-Smith
b08bcf00ac
Push interrupts from Continue and Break tags rather than from BlockBody ( #1286 )
2020-09-03 06:55:24 -04:00
Dylan Thacker-Smith
0740e8b431
Remove unused quirk allowing liquid tags to close a block it is nested in ( #1284 )
2020-09-03 06:51:56 -04:00
Dylan Thacker-Smith
5532df880f
Handle disabled tags errors like other liquid errors ( #1275 )
2020-08-18 11:39:54 -04:00
Dylan Thacker-Smith
2b11efc3ae
Fix performance regression from introduction of Template#disable_tags ( #1274 )
2020-08-18 11:25:51 -04:00
Dylan Thacker-Smith
065ccbc4aa
Remove support for taint checking
2020-07-23 16:22:46 -04:00
Feken Baboyan
8541c6be35
make Template override static registers only when the register key is not defined
2020-05-28 09:08:03 -04:00