Skip to content

fix(comark): consume nested brackets in inline component content - #306

Merged
farnabaz merged 1 commit into
comarkdown:mainfrom
sandros94:fix/nested-brackets-in-component-content
Jul 30, 2026
Merged

fix(comark): consume nested brackets in inline component content#306
farnabaz merged 1 commit into
comarkdown:mainfrom
sandros94:fix/nested-brackets-in-component-content

Conversation

@sandros94

@sandros94 sandros94 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Resolves #303

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Extracted the span rule's bracket scan into a shared findClosingBracket and pointed parseBracketContent at it, so :name[…] content and ::name[…] fence params consume nested […] pairs (images, links, nested components) instead of stopping at the first ]. The span rule keeps its unclosed-consumes-to-end streaming behavior.

P.S.: used Fable to help with branching the changes in their own PR and a final validation of my claims

📝 Checklist

 

 

  • I have linked an issue or discussion.
  • I have run pnpm verify and it passes.
  • I have updated the documentation accordingly.

Resolves comarkdown#303

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sandros94
sandros94 requested a review from farnabaz as a code owner July 29, 2026 11:29
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@sandros94 is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

comark

npm i https://pkg.pr.new/comark@306

@comark/angular

npm i https://pkg.pr.new/@comark/angular@306

@comark/ansi

npm i https://pkg.pr.new/@comark/ansi@306

@comark/html

npm i https://pkg.pr.new/@comark/html@306

@comark/nuxt

npm i https://pkg.pr.new/@comark/nuxt@306

@comark/react

npm i https://pkg.pr.new/@comark/react@306

@comark/svelte

npm i https://pkg.pr.new/@comark/svelte@306

@comark/vue

npm i https://pkg.pr.new/@comark/vue@306

commit: 1aeffad

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
comark Ready Ready Preview Jul 30, 2026 4:17pm

@farnabaz

Copy link
Copy Markdown
Collaborator

Thanks

@farnabaz
farnabaz merged commit 56e398e into comarkdown:main Jul 30, 2026
4 of 11 checks passed
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.

:name[…] content is terminated at the first ] — images and links inside components break

2 participants