Avatar

Edge Cases Testing

Demo · 2025-01-28

Edge Cases Testing

This article tests various edge cases and special scenarios.

Complex Paths

Absolute URLs

Absolute Paths

Mixed Content

Here’s a paragraph with multiple link types:

  • Regular markdown link to Test Article 1
  • External link to GitHub
  • Code with .md: ./test-article-1.md (should not convert)

Code Blocks (Should NOT Convert)

[This link](./test-article-1.md) is in a code block
const link = './test-article-1.md'
  • Spaces: [Article with spaces](./test article 1.md) (if file exists)
  • Special chars: Special (if file exists)
  • Unicode: Chinese

Expected Plugin Behavior

The plugin should:

  1. ✅ Convert relative .md and .mdx links
  2. ✅ Preserve query parameters and anchors
  3. ✅ Apply slugify based on config
  4. ❌ Ignore absolute URLs
  5. ❌ Ignore absolute paths
  6. ❌ Ignore non-markdown files
  7. ❌ Ignore links in code blocks
  8. ❌ Ignore inline code