Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
modified replace function
Browse files Browse the repository at this point in the history
  • Loading branch information
darangi committed Nov 15, 2019
1 parent 81ccb55 commit 010206a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/text-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@ class TextBuffer {
let replacements = 0

this.transact(() => {
return this.scan(regex, function ({matchText, replace}) {
replace(matchText.replace(regex, replacementText))
return this.scan(regex, function ({replace}) {
replace(replacementText)
return replacements++
})
})
Expand Down

0 comments on commit 010206a

Please # to comment.