Skip to content

Commit ff9432a

Browse files
committed
fix(util): reset state after failure
close #6
1 parent 6eef8af commit ff9432a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/pair-checker.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ export function checkPair(context, { left, right }) {
5252
matchParentheses.forEach(({node, index}) => {
5353
report(node, new RuleError(`${left}の対となる${right}が見つかりません。${left}${right}`, index));
5454
});
55+
// clear state
56+
matchParentheses = [];
5557
}
5658
};
5759

0 commit comments

Comments
 (0)