Skip to content

✨ feat(mq-lang): add md::reference_index and md::resolve_references - #2317

Merged
harehare merged 2 commits into
mainfrom
feat/md-reference-resolution
Sep 10, 2026
Merged

✨ feat(mq-lang): add md::reference_index and md::resolve_references#2317
harehare merged 2 commits into
mainfrom
feat/md-reference-resolution

Conversation

@harehare

@harehare harehare commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

Index link/footnote definitions by identifier and resolve link, image, and footnote reference nodes against them, surfacing duplicate definitions and unresolved references with their source location. Resolving against an explicitly-passed index (built from different nodes) supports linkcheck/HTML-output workflows and link updates when a document is split or moved.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor
  • 📝 Documentation
  • ⚡ Performance
  • ✅ Test
  • 📦 Build / dependencies
  • 👷 CI

Checklist

  • I ran cargo fmt and cargo clippy and addressed any warnings
  • I ran just test-all and all tests pass
  • I added or updated tests covering this change
  • I updated relevant documentation (/docs, crate README.md) if needed
  • I added a changelog entry if this is a user-facing change

Additional Context

Index link/footnote definitions by identifier and resolve link, image,
and footnote reference nodes against them, surfacing duplicate
definitions and unresolved references with their source location.
Resolving against an explicitly-passed index (built from different
nodes) supports linkcheck/HTML-output workflows and link updates when
a document is split or moved.
…t order

RuntimeValue::Dict is a BTreeMap<Ident, _>, and Ident orders by interned
symbol id rather than string content, so a multi-key dict's field order
in stringified output depends on which other identifiers this process
happened to intern first (e.g. which test files ran before toon_test.mq).
Compare sorted lines instead of an exact/ordered snapshot so the test
stays meaningful without depending on that order, and drop the now-unused
golden snapshot file.
@harehare
harehare merged commit e9d12c0 into main Sep 10, 2026
10 checks passed
@harehare
harehare deleted the feat/md-reference-resolution branch September 10, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant