Skip to content

Commit

Permalink
πŸ›πŸ— Fix start references for multiple forbidden terms (#33992)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanorozco committed Apr 23, 2021
1 parent 88dfdb8 commit 509c952
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build-system/test-configs/forbidden-terms.js
Expand Up @@ -1235,13 +1235,13 @@ function matchForbiddenTerms(srcFile, contents, terms) {
let index = 0;
let line = 1;
let column = 0;
const start = {line: -1, column: -1};

const subject = checkProse ? contents : contentsWithoutComments;
let result;
while ((result = regex.exec(subject))) {
const [match] = result;

const start = {line: -1, column: -1};
for (index; index < result.index + match.length; index++) {
if (index === result.index) {
start.line = line;
Expand Down

0 comments on commit 509c952

Please sign in to comment.