Skip to main content

Module resolve

Module resolve 

Source
Expand description

Centralized link resolution — ALL wikilink handling (body AND frontmatter) happens here.

This module provides shared types for the resolve phase of the build pipeline, a fuzzy path resolver that wraps ContentGraph::resolve_path, and the top-level resolve_content function that ties all phases together.

Architectural boundary: Downstream code (markdown.rs, render.rs) receives already-resolved paths. Do NOT add wikilink parsing or resolution elsewhere.

Modules§

asset_class
Pure asset-reference resolver shared by editor + build (single source of truth). Mirrors link_class.rs. Zero I/O — data injected via AssetIndex (ADR-018).
asset_registry
Single source of truth for all file types that moss can handle during drag, paste, scan, and embed. Every consumer (ext_kind, embed_renderer, TS-generated registry) derives from this table — no parallel lists.
block_refs
Obsidian block reference transform.
embed_renderer
Renderer registry for ![[file]] embeds.
embeds
Embed (transclusion) resolution.
ext_kind
Single source of truth mapping a file extension to its embed kind. Pure; shared by build + editor. Replaces the duplication flagged at wikilink_dispatch.rs (synth_kind_for_ext tables vs EmbedRenderer::extensions()).
folder_class
Directory-shaped resolution capability (injected; pure core). Build impl is backed by the content graph + html_files; the editor impl by the last build’s folder-index URL set plus a vault walk. Separate from AssetIndex because the backing data and the query shape (is_dir / markdown-index / static-index) differ.
fuzzy_path
Fuzzy path resolution and relative URL computation.
link_class
Pure link classification against an injected URL index. The editor implements UrlIndex over the inverted ArticleMap; the build may implement it over page_map for the parity test. moss-core does NO I/O.
md_extract
Pure markdown reference extractor — zero I/O, no resolve, no indexes.
output_url
Pure output-path + output-relative-URL helpers shared by every asset/embed/ folder emitter. resolve_path_with_overrides slugifies intermediate dir segments (generate_slug) and preserves the leaf; pinned_url is the one way a resolved source path becomes a URL in emitted HTML; reference_output_url computes the relative URL between two source paths IN OUTPUT SPACE so a shared mixed-case prefix cancels (the Bug A fix, generalized).
reference
The single reference classifier shared by build + editor (asset/file-embed/ folder kinds). Pure; indexes injected via ReferenceContext. Page-Link emission is out of scope here (the build keeps relative_pretty_url/page_map); Link is classify-only. Named classify_reference to avoid colliding with fuzzy_path::resolve_reference (the [[note]]/ContentGraph resolver).
registry
Extensible registry for embed renderers.
title_params
In-process typed-params struct for moss embed synthesizers.
wikilink_dispatch
Phase 3: Stage 2 entry point for wikilink embed dispatch.

Structs§

Diagnostic
A diagnostic message from the resolve phase.
FrontmatterResolveResult
OutgoingLink
A link going out from a document.
ResolveResult
Result of resolving all Obsidian syntax in a markdown file.

Enums§

DiagnosticKind
What a resolve diagnostic is about.
LinkType
The kind of link syntax used.

Functions§

resolve_content
Resolve all Obsidian syntax in a markdown file, producing clean standard markdown.
resolve_content_with_handlers
Variant of resolve_content that threads a custom registry::RendererRegistry (plugin-aware renderer dispatch) and embeds::MarkerHandlers (resolvers for Deferred markers: notebook, table, plugin renderers) through the pipeline.
resolve_content_with_handlers_and_snapshot
Variant of resolve_content_with_handlers that additionally threads an AssetSnapshot through the resolve pipeline.
resolve_frontmatter_wikilinks
Resolve [[wikilink]] patterns in frontmatter text to content graph paths.