DevCase/tests/features
Ade Attwood fcaf425042 fix: infinite loop when using .* patterns
Summary:

When we are using `.*` patterns, this causes an infinite loop. What happens is
we are adding text to the end and then replacing that. Its only when we are
matching the end of the output string.

We can detect this when the starting point is the same as the end point and the
match is "" (an empty string). If we hit this condition we can get out and
return the output that has been replaced.

Test Plan:

Test in CI
2024-05-29 17:33:47 +01:00
..
basic.feature chore: initial commit 2024-05-10 20:53:50 +01:00
case-perserving.feature feat: add case preserving search and replace 2024-05-11 19:44:05 +01:00
regex.feature fix: infinite loop when using .* patterns 2024-05-29 17:33:47 +01:00