findForbiddenPatternMatches
Finds every line of text that one of patterns matches.
Import:
import { findForbiddenPatternMatches } from 'obsidian-dev-utils/script-utils/forbidden-patterns';Signature:
function findForbiddenPatternMatches(text: string, patterns: readonly RegExp[]): ForbiddenPatternMatch[]Parameters:
| Parameter | Type | Description |
|---|---|---|
text |
string | The text to scan, line by line. |
patterns |
readonly RegExp[] | The patterns, as readForbiddenPatterns returned them. |
Returns: ForbiddenPatternMatch[] — One ForbiddenPatternMatch per offending line, naming the first pattern that matched it.