From 4f2f14212cea24a98e4e4effa14b46344b0f9c1b Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Mon, 28 Oct 2024 17:37:55 -0400 Subject: [PATCH] Use contains function, since the content may have multiple characters --- matching.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matching.go b/matching.go index 000c88c..0fc0cbe 100644 --- a/matching.go +++ b/matching.go @@ -47,7 +47,7 @@ func findAllMatchesHelper(start *State, str string, indices []matchIndex, offset startingFrom := i // Store starting index // Increment until we hit a character matching the start state (assuming not 0-state) if start.isEmpty == false { - for i < len(str) && int(str[i]) != start.content { + for i < len(str) && !start.content.contains(int(str[i])) { i++ } startIdx = i