Dylan Thacker-Smith
60075ddda2
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-08 14:07:20 -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
6ca5b62112
Merge pull request #1285 from Shopify/fix-render-length-resource-limit
...
Fix render length resource limit so it doesn't multiply nested output
2020-09-08 13:57:30 -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
Thierry Joyal
a1d982ca76
Merge pull request #1272 from Shopify/StaticRegisters/add-test-coverage
...
[StaticRegisters] Add test coverage
2020-08-04 08:31:45 -04:00
Thierry Joyal
03be7f1ee3
[StaticRegisters] Add test coverage
2020-07-28 10:23:51 -04:00
Dylan Thacker-Smith
1ced4eaf10
Merge pull request #1268 from Shopify/remove-taint-checking
...
Remove support for taint checking
2020-07-25 21:27:46 -04:00
Dylan Thacker-Smith
4970167726
Bump rake development dependency
...
Gets rid of a deprecation warning when running the tests.
2020-07-23 16:23:18 -04:00
Dylan Thacker-Smith
065ccbc4aa
Remove support for taint checking
2020-07-23 16:22:46 -04:00
Feken Baboyan
1feaa63813
Merge pull request #1258 from Shopify/fix-context-overriding-in-templates
...
Fix how Template overrides static registers when #render is invoked
2020-05-28 09:32:31 -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
Thierry Joyal
18654526c8
Merge pull request #1257 from Shopify/StaticRegisters/remove-registers-attr-reader
...
[StaticRegisters] Remove registers attr_reader
2020-05-22 14:01:37 -04:00
Thierry Joyal
bd1f7f9492
[StaticRegisters] Remove assertion for delete to not remove static content
2020-05-22 13:42:44 -04:00
Thierry Joyal
40d75dd283
Update test/unit/static_registers_unit_test.rb
...
Co-authored-by: Dylan Thacker-Smith <dylan.smith@shopify.com >
2020-05-22 12:15:52 -04:00
Thierry Joyal
f5011365f1
[StaticRegisters] Remove registers attr_reader
2020-05-22 10:51:07 -04:00
Thierry Joyal
ebbd046c92
Merge pull request #1250 from Shopify/static-registers/fetch-raise-on-missing
...
[StaticRegisters] Fetch raise on missing
2020-05-22 09:56:05 -04:00
Thierry Joyal
b9979088ec
[StaticRegisters] Fetch raise on missing
...
Co-authored-by: Dylan Thacker-Smith <dylan.smith@shopify.com >
2020-05-22 09:35:47 -04:00
Dylan Thacker-Smith
bd0e53bd2e
Merge pull request #1239 from Shopify/remove-bad-arity-assumption
...
Fix ParseTreeVisitorTest for ruby-head
2020-05-21 14:02:04 -04:00
Thierry Joyal
4b586f4105
Merge pull request #1251 from Shopify/travis/optional-head
...
[Travis] Optional head
2020-05-21 13:51:11 -04:00
Thierry Joyal
0410119d5f
[Travis] Optional head
2020-05-21 12:45:14 -04:00
Dylan Thacker-Smith
c2f67398d0
Allow ruby-head failures
...
Ignore an object allocation test failure on ruby-head for now.
2020-03-31 10:53:49 -04:00
Dylan Thacker-Smith
81149344a5
Fix ParseTreeVisitorTest for ruby-head
2020-03-31 10:53:46 -04:00
Dylan Thacker-Smith
e9b649b345
Fix Liquid::Template inheritance ( #1227 )
...
self.class.default_resource_limits would return `nil` in a subclass, since
the attribute isn't set on subclasses.
2020-01-21 15:09:22 -05:00
Celso Dantas
9c538f4237
Merge pull request #1207 from Shopify/moving-const-to-const
...
Use String literal instead
2020-01-20 12:37:57 -05:00
Celso Dantas
c08a358a2b
Use String literal instead of using a class method
...
The class method string definition is not needed here, so it can be removed.
2020-01-16 09:42:32 -05:00
Justin Li
dbaef5e79b
Merge pull request #1180 from Shopify/test-all-filters
...
Test all filters against random data to detect exceptions
2020-01-13 15:52:44 -05:00
Dylan Thacker-Smith
48a155a213
Initialize Liquid::Template class attributes eagerly instead of lazily ( #1223 )
2020-01-10 17:42:01 -05:00
Dylan Thacker-Smith
c69a9a77c6
Merge pull request #1215 from Shopify/nested-liquid-tag
...
Fix liquid tag nested in outer block
2020-01-09 19:24:52 -05:00
Dylan Thacker-Smith
ef79fa3898
style: Avoid deep nesting for parsing the liquid tag in the block body
2020-01-09 19:13:13 -05:00
Dylan Thacker-Smith
f7ad602bfc
Fix liquid tag nested in outer block
2020-01-09 19:13:13 -05:00
Dylan Thacker-Smith
ffd6049ba2
Merge pull request #1222 from Shopify/bump-ci-ruby
...
Test against the latest ruby in CI
2020-01-09 18:12:36 -05:00
Dylan Thacker-Smith
b3ad54c0c2
Test against the latest ruby in CI
2020-01-09 13:15:34 -05:00
Dylan Thacker-Smith
67eca3f58d
Upgrade rubocop and style guide for ruby 2.7 compatibility
2020-01-09 13:15:34 -05:00
Thierry Joyal
0847bf560f
Merge pull request #1218 from Shopify/strainer/remove-safe-navigation
...
Remove handling of a nil context in the Strainer class
2020-01-07 11:54:49 -05:00
Dylan Thacker-Smith
8074565c3e
Merge pull request #1216 from Shopify/unsupported-taint-mode
...
Remove support for taint_mode on ruby versions that don't support it
2020-01-07 10:12:36 -05:00
Thierry Joyal
24e81267b9
Merge pull request #1208 from Shopify/strainer/revisit
...
[Strainer] Separate factory from template
2020-01-06 13:56:22 -05:00
Thierry Joyal
c0ffee3ff9
[Strainer] Remove safe navigation
2020-01-06 18:34:13 +00:00
Thierry Joyal
c0ffeeef26
[Strainer] Separate factory from template
2020-01-06 17:45:25 +00:00
Dylan Thacker-Smith
22dbf90b7d
Try to stay compatible with ruby-head
2019-12-19 11:12:55 -05:00
Dylan Thacker-Smith
40c68c9c83
Remove support for taint_mode on ruby versions that don't support it
2019-12-19 11:12:51 -05:00
Martin Morissette
b7f0f158ab
Merge pull request #1212 from Shopify/template-factory
...
Introduce template factory
2019-12-19 08:52:22 -05:00
Martin Morissette
d8f31046a9
Introduce template factory
2019-12-17 21:45:08 -05:00