Fixed boneheaded mistake with checking assertion types

master
Aadhavan Srinivasan 2 months ago
parent 1aff6e2fa4
commit 0736e813c1

@ -34,12 +34,10 @@ func (s State) contentContains(str []rune, idx int) bool {
return idx == len(str)
}
if s.assert == WBOUND {
if s.assert == WBOUND {
return isWordBoundary(str, idx)
}
if s.assert == NONWBOUND {
return !isWordBoundary(str, idx)
}
return isWordBoundary(str, idx)
}
if s.assert == NONWBOUND {
return !isWordBoundary(str, idx)
}
// Default - s.assert must be NONE
return slices.Contains(s.content, int(str[idx]))

Loading…
Cancel
Save