UpdateFileUrlLinksInContentParams
Params for updateFileUrlLinksInContent.
Import:
import type { UpdateFileUrlLinksInContentParams } from '@mnaoumov/obsidian-lib/link';Signature:
export interface UpdateFileUrlLinksInContentParamsProperties
| Property | Type | Description |
|---|---|---|
| abortSignal? | AbortSignal | The abort signal to control the execution of the function. |
| app | App | An Obsidian app instance. |
| content | string | The content to normalize the file:// links in. |
| offsetRange? | OffsetRange | A range within UpdateFileUrlLinksInContentParams.content, in character offsets, restricting the pass to the links inside it. When omitted, every link is visited. A link is normalized only when it is **fully contained** in the range; one that merely overlaps it is left alone, because rewriting part of a link corrupts it. Both bounds are inclusive, so a range whose offsets coincide exactly with a link's does include that link. A reference that carries no position within the content — a frontmatter link, a multi-link frontmatter value entry, or any canvas reference — is never in range and is skipped whenever a range is supplied. |
| shouldSkipReference? | ((reference: Reference) => boolean) | null | A predicate choosing links to leave unchanged: for each reference it returns true for, the converter is not called, so the link stays byte-for-byte as written — its path, style, angle brackets and leading dot included. Use it to exclude links the caller decides on, for example by their resolved target path.Applied after the heading skip and the offset range. null behaves like an absent key, so a predicate factory that returns null when nothing is excluded can be passed straight through. |
| shouldSkipReferencesInHeadings? | boolean | Whether to leave every link inside a heading unchanged. See EditReferencesInContentParams.shouldSkipReferencesInHeadings. |
| shouldUseAngleBrackets? | boolean | Whether to emit the normalized links with angle brackets and raw spaces instead of %20-encoding. |
Links to this page: