Contains utility functions for handling references in Obsidian.
| Function | Description |
|---|
| isCanvasFileNodeReference | Checks if a reference is a canvas file node reference. |
| isCanvasReference | Checks if a reference is a canvas reference. |
| isCanvasTextNodeReference | Checks if a reference is a canvas text node reference. |
| isReferenceInOffsetRange | Checks if a reference is fully contained within an offset range. Only a reference that carries a position within the file’s content can be in a range. A FrontmatterLinkCache — a frontmatter link, a multi-link frontmatter value entry, or any canvas reference — carries no such position and is therefore never in range. Its startOffset / endOffset, where present, locate the link within its own property value rather than within the file, so they are deliberately not compared against the range. Containment is full and both bounds are inclusive: a reference that only partially overlaps the range is not in it, because rewriting part of a link corrupts it. |
| referenceToFileChange | Converts a reference to a file change. |
| sortReferences | Sorts references by their type and position. |