diff --git a/matching.go b/matching.go index 8f2f855..09700cd 100644 --- a/matching.go +++ b/matching.go @@ -29,11 +29,8 @@ func findAllMatches(start *State, str string) (indices []matchIndex) { return findAllMatchesHelper(start, str, make([]matchIndex, 0), 0) } func findAllMatchesHelper(start *State, str string, indices []matchIndex, offset int) []matchIndex { - // 'Base case' - exit if string is empty. If the starting state is a last-state, then append the final set of indices (trailing whitespace) + // 'Base case' - exit if string is empty. if len(str) == 0 { - if start.isLast { - indices = append(indices, matchIndex{offset, offset + 1}) - } return indices }