Rewrote the changes to findAll using if/else
This commit is contained in:
parent
6621454dec
commit
067c3816ba
1 changed files with 3 additions and 3 deletions
|
|
@ -838,7 +838,7 @@ iterator findAll*(s: string, pattern: TPeg, start = 0): string =
|
||||||
var L = rawMatch(s, pattern, i, c)
|
var L = rawMatch(s, pattern, i, c)
|
||||||
if L < 0:
|
if L < 0:
|
||||||
inc(i, 1)
|
inc(i, 1)
|
||||||
continue
|
else:
|
||||||
yield substr(s, i, i+L-1)
|
yield substr(s, i, i+L-1)
|
||||||
inc(i, L)
|
inc(i, L)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue