import type { NormalizedRule } from '../types/index.js'; import type { ScopedSegment, TextRange } from '../scopes/types.js'; /** * Every span of `segment.content` a prose rule must not match inside: the * segment's inline code spans, plus the markdoc tag spans masking blanked out * of it. * * Both are text that is present in the source but isn't prose, and both have to * be excluded the same way — by discarding a match that overlaps them, never by * scanning a substitute string. These rules run an arbitrary user-supplied * regex, and a masked run is still characters to it: a blanked tag reads as * whitespace to `\s+` and as ordinary content to any negated class, either of * which lets one match span a tag and merge the real text on both sides of it. * A swap pair `alpha\s+beta` matched clean across `alpha {% partial /%} beta`, * and `--fix` then collapsed the tag out of the document. * * One helper rather than a call per rule, so a rule added later inherits the * full exclusion set by asking for it instead of re-deriving half of it. * `includeCode` turns the code-span half off; the markdoc half has no opt-out, * because a tag is markup, never the prose a rule was pointed at. */ export declare function nonProseRanges(segment: ScopedSegment, includeCode?: boolean): TextRange[]; /** Whether `file` matches any pattern, with the same semantics as `exceptions.files`. */ export declare function fileMatchesAnyPattern(file: string, patterns: string[]): boolean; export declare function shouldProcessFile(file: string, rule: NormalizedRule): boolean; /** * Check if a line should be excluded based on line exceptions. * Returns true if the line should be skipped. */ export declare function shouldSkipLine(lineContent: string, rule: NormalizedRule): boolean; //# sourceMappingURL=utils.d.ts.map