This module provides utilities for parsing markdown and wiki links into structured data, and for escaping, unescaping, and encoding link components.
| Function |
Description |
| escapeAlias |
Escapes the alias of a markdown link. |
| isParseLinkFrontmatterReference |
Determines whether a reference is a ParseLinkFrontmatterReference. |
| isParseLinkReference |
Determines whether a reference is a ParseLinkReference. |
| parseFrontmatterLinks |
Parses 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. |
| parseLink |
Parses a link into its components. |
| parseLinks |
Parses all links in a string. Besides markdown links, wikilinks and autolinks, the plain text between them is scanned for bare URLs with a scheme (https://example.com) and, unless turned off through ParseLinksOptions.shouldRecognizeWwwAutolinkLiterals, for GFM extended www. autolink literals (www.example.com). Such a literal is reported as an external link whose url carries the http:// scheme Obsidian opens it with, so a link rebuilt from it stays external: a scheme-less [alias](www.example.com) is an internal link in Obsidian. A literal wrapped in <...> reports the brackets as part of raw, so replacing raw leaves no stray bracket behind. |
| toParseLinkReference |
Wraps a ParseLinkResult into a ParseLinkReference so it can flow through the reference-based file-change pipeline. |
| unescapeAlias |
Unescapes the alias of a markdown link. |