mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Add ParseTreeVisitor to Echo tag
This fixes theme-check#218, wherein variables used in echo tags are not considered used by the linter. It is because our visitor doesn't see the :variable_lookup's in the echo tag since the children array is empty. But this array is empty because it is swallowed by the @variable.
This commit is contained in:
@@ -26,6 +26,13 @@ class ParseTreeVisitorTest < Minitest::Test
|
||||
)
|
||||
end
|
||||
|
||||
def test_echo
|
||||
assert_equal(
|
||||
["test"],
|
||||
visit(%({% echo test %}))
|
||||
)
|
||||
end
|
||||
|
||||
def test_if_condition
|
||||
assert_equal(
|
||||
["test"],
|
||||
|
||||
Reference in New Issue
Block a user