From 56e49328fbadab7ead27c8b5b905afc2f47a860e Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Tue, 13 Aug 2024 21:00:00 -0300 Subject: [PATCH] Tiny bug --- src/rules.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rules.cr b/src/rules.cr index 1f4a7eb..a7dc872 100644 --- a/src/rules.cr +++ b/src/rules.cr @@ -19,7 +19,7 @@ module Tartrazine match = pattern.match(text, pos) # We don't match if the match doesn't move the cursor # because that causes infinite loops - return false, pos, [] of Token if match.nil? || match.end == 0 + return false, pos, [] of Token if match.nil? || match.size == 0 # Log.trace { "#{match}, #{pattern.inspect}, #{text}, #{pos}" } tokens = [] of Token # Emit the tokens