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 viaAssetIndex(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
UrlIndexover 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_overridesslugifies intermediate dir segments (generate_slug) and preserves the leaf;pinned_urlis the one way a resolved source path becomes a URL in emitted HTML;reference_output_urlcomputes 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_referenceto avoid colliding withfuzzy_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.
- Frontmatter
Resolve Result - Outgoing
Link - A link going out from a document.
- Resolve
Result - Result of resolving all Obsidian syntax in a markdown file.
Enums§
- Diagnostic
Kind - What a resolve diagnostic is about.
- Link
Type - 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_contentthat threads a customregistry::RendererRegistry(plugin-aware renderer dispatch) andembeds::MarkerHandlers(resolvers for Deferred markers: notebook, table, plugin renderers) through the pipeline. - resolve_
content_ with_ handlers_ and_ snapshot - Variant of
resolve_content_with_handlersthat additionally threads anAssetSnapshotthrough the resolve pipeline. - resolve_
frontmatter_ wikilinks - Resolve
[[wikilink]]patterns in frontmatter text to content graph paths.