more micro optimization

This commit is contained in:
Michael Go
2024-10-30 13:54:00 -03:00
parent 1b3927ee1d
commit e3c2fd47b2
+6 -3
View File
@@ -96,15 +96,18 @@ module Liquid
byte_b = @ss.peek_byte
if byte_b != CLOSE_CURLEY && byte_b != PERCENTAGE
@ss.pos += 1
byte_a = byte_b
next
end
if byte_a == CLOSE_CURLEY && byte_b == CLOSE_CURLEY
@ss.pos += 1
return @ss.string.byteslice(start, @ss.pos - start)
elsif byte_a == OPEN_CURLEY && byte_b == PERCENTAGE
return next_tag_token(start)
end
byte_a = byte_b
@ss.pos += 1
end
return "{{"