Skip to content

Commit 452a6f9

Browse files
authored
Merge pull request #82 from ar-shao/pattern
replaceAll always replace str with ''
2 parents 97d39b6 + a91f622 commit 452a6f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Pattern.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class Pattern
134134
count = 0
135135
while @regex.test(str) and (limit is 0 or count < limit)
136136
@regex.lastIndex = 0
137-
str = str.replace @regex, ''
137+
str = str.replace @regex, replacement
138138
count++
139139

140140
return [str, count]

0 commit comments

Comments
 (0)