Merge pull request #2625 from overleaf/bg-fix-spelling-stateful-regexp

fix stateful regexp usage in SpellCheckManager

GitOrigin-RevId: 6ac93e6a9227a638b30882ce99771e30c1a097c1
This commit is contained in:
Eric Mc Sween 2020-02-27 07:47:53 -05:00 committed by Copybot
parent 5f712645ed
commit 130f97d621

View file

@ -337,6 +337,7 @@ define([], function() {
let rowIdx = changedRowNums[row]
line = this.blankOutBlacklistedCommands(line)
var result
WORD_REGEX.lastIndex = 0 // reset global stateful regexp for this usage
while ((result = WORD_REGEX.exec(line))) {
let word = result[0]
if (word[0] === "'") {