clipMatches
Clips match ranges to a span of the searched text and shifts them to the span’s start.
Import:
import { clipMatches } from '@mnaoumov/obsidian-lib/file-input-suggest';Signature:
function clipMatches(matches: SearchMatches, start: number, end: number): SearchMatchesParameters:
| Parameter | Type | Description |
|---|---|---|
matches |
SearchMatches | The match ranges over the whole text. |
start |
number | The span start. |
end |
number | The span end. |
Returns: SearchMatches — The ranges inside the span, relative to its start.