Skip to content

Fix to correctly parse Obsidian-style ![[img]], skip internal text formatting#291

Merged
huacnlee merged 1 commit intohuacnlee:mainfrom
Zevan770:markdown-wiki-img
Dec 1, 2025
Merged

Fix to correctly parse Obsidian-style ![[img]], skip internal text formatting#291
huacnlee merged 1 commit intohuacnlee:mainfrom
Zevan770:markdown-wiki-img

Conversation

@Zevan770
Copy link
Contributor

  • Refine pest grammar so img = ${ image_prefix ~ (wikilinks | link) }
  • Ensures both Obsidian-style images ![[...]] and standard images are correctly parsed as img, preventing over-formatting inner text
  • Added test for obsidian-style image

Indeed, this is just a dialect of markdown. But since we've already supported wikilinks and implementing this is as simple as one line modification in markdown.pest, I just did it.

…l text formatting

- Refine pest grammar so `img = ${ image_prefix ~ (wikilinks | link) }`
- Ensures both Obsidian-style images `![[...]]` and standard images are
correctly parsed as img, preventing over-formatting inner text
- Added test for obsidian-style image
@huacnlee huacnlee changed the title feat(markdown): correctly parse Obsidian-style ![[img]], skip internal text formatting Fix to correctly parse Obsidian-style ![[img]], skip internal text formatting Dec 1, 2025
@huacnlee huacnlee enabled auto-merge (squash) December 1, 2025 00:27
@huacnlee huacnlee merged commit 1d75ab8 into huacnlee:main Dec 1, 2025
4 of 6 checks passed
Zevan770 added a commit to Zevan770/astronvim that referenced this pull request Dec 10, 2025
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.

2 participants