Skip to content

feat: resolve ![[file.md]] includes#24

Merged
teezeit merged 2 commits into
mainfrom
feat/include-syntax
Apr 21, 2026
Merged

feat: resolve ![[file.md]] includes#24
teezeit merged 2 commits into
mainfrom
feat/include-syntax

Conversation

@teezeit
Copy link
Copy Markdown
Owner

@teezeit teezeit commented Apr 21, 2026

Summary

  • Adds resolveIncludes(markdown, basePath) to the parser — expands ![[file.md]] syntax by inlining the referenced file's content
  • Paths resolve relative to the base file, not cwd
  • Missing files render as a > ⚠️ Could not include: ... warning blockquote
  • Wired into the CLI (generateOutput) and VS Code preview provider
  • Regex updated to allow optional whitespace inside ![[ ... ]] brackets

Test plan

  • 7 new unit tests in tests/includes.test.ts covering: no-op pass-through, inlining, missing file warning, relative path resolution, multiple includes, non-.md syntax ignored, whitespace trimming
  • Full suite passes (597 tests)

🤖 Generated with Claude Code

teezeit and others added 2 commits April 22, 2026 00:21
Add resolveIncludes() to the parser which expands ![[file.md]] syntax
by inlining the referenced file's content. Paths resolve relative to
the base file. Missing files render as a warning blockquote. Wired into
the CLI pipeline and the VS Code preview provider.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- docs/guide/syntax.md: add File Includes section
- QUICK-REFERENCE.md: add include row to component table, troubleshooting entry
- SYNTAX-SPEC-v0.1.md: move file includes from deferred to included (v0.1)
- claude-skill/references/syntax.md: replace obsolete :::display with ![[file.md]]
- claude-skill/SKILL.md: update gotcha #5 — :::display is obsolete, ![[]] works in CLI and VS Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@teezeit teezeit merged commit 6ea1a3e into main Apr 21, 2026
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