Fix line number tracking after a non-empty blank token

This commit is contained in:
Justin Li
2019-04-08 18:43:09 -04:00
parent 951abb67ee
commit e6ed804ca5
2 changed files with 8 additions and 3 deletions

View File

@@ -74,6 +74,11 @@ class LiquidTagTest < Minitest::Test
LIQUID
end
def test_line_number_is_correct_after_a_blank_token
assert_match_syntax_error("syntax error (line 3): Unknown tag 'error'", "{% liquid echo ''\n\n error %}")
assert_match_syntax_error("syntax error (line 3): Unknown tag 'error'", "{% liquid echo ''\n \n error %}")
end
def test_cannot_open_blocks_living_past_a_liquid_tag
assert_match_syntax_error("syntax error (line 3): 'if' tag was never closed", <<~LIQUID)
{%- liquid