Replace helpers.overlapsAnyRange with .withinAnyRange, update code/tests for resulting behavior.

This commit is contained in:
David Anson 2022-06-02 22:17:32 -07:00
parent cb943a8718
commit 6718944b0f
10 changed files with 70 additions and 53 deletions

View file

@ -2,7 +2,7 @@
"use strict";
const { addError, filterTokens, forEachLine, overlapsAnyRange } =
const { addError, filterTokens, forEachLine, withinAnyRange } =
require("../helpers");
const { codeBlockAndSpanRanges, lineMetadata } = require("./cache");
@ -39,7 +39,7 @@ module.exports = {
const { index } = match;
const column = index + 1;
const length = match[0].length;
if (!overlapsAnyRange(exclusions, lineIndex, index, length)) {
if (!withinAnyRange(exclusions, lineIndex, index, length)) {
addError(
onError,
lineIndex + 1,