mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Add variable_name_expr to render's ParseTreeVisitor
Solves Shopify/theme-check#582 `icon` should be visited in the render tag for the following snippet: ```liquid {% assign icon = 'warning' } {% render 'icon' with icon %} ```
This commit is contained in:
@@ -236,6 +236,20 @@ class ParseTreeVisitorTest < Minitest::Test
|
||||
)
|
||||
end
|
||||
|
||||
def test_render_with
|
||||
assert_equal(
|
||||
["test"],
|
||||
visit(%({% render "hai" with test %}))
|
||||
)
|
||||
end
|
||||
|
||||
def test_render_for
|
||||
assert_equal(
|
||||
["test"],
|
||||
visit(%({% render "hai" for test %}))
|
||||
)
|
||||
end
|
||||
|
||||
def test_preserve_tree_structure
|
||||
assert_equal(
|
||||
[[nil, [
|
||||
|
||||
Reference in New Issue
Block a user