fix: Process embeds before wikilinks to prevent incorrect .md extensions on images
- Reorder processing steps: embeds first, then wikilinks - Prevents ![[image.jpg]] from becoming  - Ensures image filenames remain correct for Pandoc/Typst resolution This fixes the core issue where image files were getting .md extensions appended, causing Typst to look for non-existent .md files instead of the actual image files. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2 files changed
+48
-8
No files matched your search
@@ -97,12 +97,12 @@ export class MarkdownPreprocessor {
|
||||
}
|
||||
}
|
||||
|
||||
// Step 3: Convert wikilinks
|
||||
result.content = this.parseWikilinks(result.content, result);
|
||||
|
||||
// Step 4: Convert embeds
|
||||
// Step 3: Convert embeds FIRST (before wikilinks to avoid .md extension being added)
|
||||
result.content = this.parseEmbeds(result.content, result);
|
||||
|
||||
// Step 4: Convert wikilinks (after embeds are processed)
|
||||
result.content = this.parseWikilinks(result.content, result);
|
||||
|
||||
// Step 5: Convert callouts
|
||||
result.content = this.parseCallouts(result.content, result);
|
||||
|
||||
|
||||
Reference in new issue
Block a user