Skip to content

obsidian/parse-link

This module provides utilities for parsing markdown and wiki links into structured data, and for escaping, unescaping, and encoding link components.

InterfaceDescription
ParseFrontmatterLinksResultThe result of parsing the links from a note’s frontmatter via parseFrontmatterLinks. Internal single-link frontmatter values are omitted, as Obsidian natively caches them.
ParseLinkFrontmatterReferenceA FrontmatterLinkCache for a link parsed from a single-link frontmatter value via parseLinks. It carries the full ParseLinkResult so consumers can inspect the parse details without re-parsing the link. Use this when the whole frontmatter value is a single link.
ParseLinkFrontmatterReferenceWithOffsetsA ParseLinkFrontmatterReference for a link parsed from a multi-link frontmatter value via parseLinks, additionally carrying the offsets of the link within the frontmatter value. Use this when the frontmatter value holds multiple links.
ParseLinkReferenceA ReferenceCache for a link parsed from content via parseLinks. It carries the full ParseLinkResult so consumers can inspect the parse details without re-parsing the link.
ParseLinkResultA result of parsing a link.
ToParseLinkReferenceParamsParams for toParseLinkReference.
FunctionDescription
encodeUrlEncodes a URL.
escapeAliasEscapes the alias of a markdown link.
isParseLinkFrontmatterReferenceDetermines whether a reference is a ParseLinkFrontmatterReference.
isParseLinkReferenceDetermines whether a reference is a ParseLinkReference.
parseFrontmatterLinksParses the links from a note’s frontmatter. Each string value is parsed via parseLinks: a value that is a single link yields an entry without offsets, and a value that holds multiple links yields offset-carrying entries. Internal single-link values are omitted, as Obsidian natively caches them.
parseLinkParses a link into its components.
parseLinksParses all links in a string.
toParseLinkReferenceWraps a ParseLinkResult into a ParseLinkReference so it can flow through the reference-based file-change pipeline.
unescapeAliasUnescapes the alias of a markdown link.