Fix bug in tokenizer with nil value

This commit is contained in:
Bahar Pourazar
2024-12-17 15:34:13 +00:00
parent fdd8c714b2
commit a0a4307e7d
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -30,6 +30,10 @@ class TokenizerTest < Minitest::Test
assert_equal([1, 1, 3], tokenize_line_numbers(" {{\n funk \n}} "))
end
def test_tokenize_with_nil_source_returns_empty_array
assert_equal([], tokenize(nil))
end
private
def new_tokenizer(source, parse_context: Liquid::ParseContext.new, start_line_number: nil)