Closed Maaarcocr closed 1 year ago
How confident are you that this is what liquid-c does?
Hi. As is, this PR would fail the following test case, but pass with liquid-c.
def test_inline_liquid_tag_in_liquid_tag
assert_template_result('42', <<~LIQUID)
{%- liquid
liquid echo 42
-%}
LIQUID
end
why?
matches liquid-c behaviour
how?
~just skip the liquid tag if it's inside a liquid tag, it essentially does not change any behaviour as far as I can see.~
EDIT: matching the actual liquid-c behaviour we now recursively parse the markup for liquid tags inside liquid tags. I have to decrease the line number by 1 because when tokenizing in liquid tag mode we always up line number by one, but really in this case we are staying in the same line.