From b7b640098506506f9fda3947b00875e59f2617b0 Mon Sep 17 00:00:00 2001 From: Michael Go Date: Mon, 28 Oct 2024 16:31:17 -0300 Subject: [PATCH] fix typo --- lib/liquid/tokenizer.rb | 2 +- test/unit/tokenizer_unit_test.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/liquid/tokenizer.rb b/lib/liquid/tokenizer.rb index 0724c28d..bc33adcb 100644 --- a/lib/liquid/tokenizer.rb +++ b/lib/liquid/tokenizer.rb @@ -7,7 +7,7 @@ module Liquid attr_reader :line_number, :for_liquid_tag TAG_END = /%\}/ - TAG_OR_VARIABLE_START = /\{[\{\%}]/ + TAG_OR_VARIABLE_START = /\{[\{\%]/ NEWLINE = /\n/ OPEN_CURLEY = "{".ord diff --git a/test/unit/tokenizer_unit_test.rb b/test/unit/tokenizer_unit_test.rb index 6e855724..a50b76ce 100644 --- a/test/unit/tokenizer_unit_test.rb +++ b/test/unit/tokenizer_unit_test.rb @@ -6,6 +6,7 @@ class TokenizerTest < Minitest::Test def test_tokenize_strings assert_equal([' '], tokenize(' ')) assert_equal(['hello world'], tokenize('hello world')) + assert_equal(['{}'], tokenize('{}')) end def test_tokenize_variables