Skip to content

fix(render): don't end a paragraph after an inline comment - #544

Merged
farnabaz merged 1 commit into
comarkdown:mainfrom
danielroe:fix-11
Nov 2, 2026
Merged

farnabaz merged 1 commit into
comarkdown:mainfrom
danielroe:fix-11

Conversation

@danielroe

@danielroe danielroe commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What

Note

context: this is one of a few fixes from round-tripping the Nuxt docs through parseMarkdown -> renderMarkdown.

an inline comment splits its paragraph when rendered to markdown:

text <!-- note --> tail

renders as:

text <!-- note -->

 tail

which comes back as two paragraphs. it's the same inside a component or a list item (where it also ends the list).

this passes the parent through from one() and skips the separator when the comment is inline, using the same text-sibling check as the mdc handler.


Play the walkthrough

@danielroe
danielroe requested a review from farnabaz as a code owner November 2, 2026 09:49
@coldtea-pr-lens

coldtea-pr-lens Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Architecture

Architecture diagram for comarkdown/comark at 0204e87

Play the walkthrough


Data flow

No data-flow sequence changed in this PR.


Tip

Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."

🪧 More tips
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time
  • Set hub.lumenfield.workment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture… row. Drawing still runs as before
  • Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing pull requests on its own. Comment @pr-lens draw on a pull request when you want that one drawn
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works
  • After a push, tick Redraw to draw the latest commit
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion
  • Set github.description: false in .github/pr-lens.yml to stop PR Lens adding buttons to your PR descriptions

Thanks for using PR Lens! It's free for OSS. If it helped, a star helps other teams find it.  Star PR Lens on GitHub

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0925f816-a000-4676-932b-3e37e989dde4
Commits

Reviewing files that changed from the base of the PR and between 1f734a5 and 0204e87.

Files selected for processing: 3
  • packages/comark/src/internal/stringify/handlers/comment.ts
  • packages/comark/src/internal/stringify/state.ts
  • packages/comark/test/html-roundtrip.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@vercel

vercel Bot commented Nov 2, 2026

Copy link
Copy Markdown

@danielroe 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 Nov 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

comark

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

@comark/angular

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

@comark/ansi

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

@comark/html

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

@comark/nuxt

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

@comark/react

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

@comark/svelte

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

@comark/vue

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

commit: 0204e87

@codspeed

codspeed Bot commented Nov 2, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 5 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 41 untouched benchmarks


Comparing danielroe:fix-11 (0204e87) with main (1f734a5)

Open in CodSpeed

@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
comark Ready Ready Preview Nov 2, 2026 11:54am UTC
comark-binding Ready Ready Preview Nov 2, 2026 11:54am UTC
comark-json-render Ready Ready Preview Nov 2, 2026 11:54am UTC
comark-nextjs Ready Ready Preview Nov 2, 2026 11:54am UTC
comark-nuxt Ready Ready Preview Nov 2, 2026 11:54am UTC
comark-svelte Ready Ready Preview Nov 2, 2026 11:54am UTC
comark-sveltekit Ready Ready Preview Nov 2, 2026 11:54am UTC
comark-twoslash Ready Ready Preview Nov 2, 2026 11:54am UTC
comark-vue Ready Ready Preview Nov 2, 2026 11:54am UTC

@farnabaz farnabaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks

@farnabaz
farnabaz merged commit 679ce8f into comarkdown:main Nov 2, 2026
18 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 5, 2026

This branch was successfully deployed

8 active deployments
Preview – comark-nuxt — 0204e876 Deployed Nov 2, 2026 by vercel[bot]
Preview – comark-twoslash — 0204e876 Deployed Nov 2, 2026 by vercel[bot]
Preview – comark-vue — 0204e876 Deployed Nov 2, 2026 by vercel[bot]
Preview – comark-sveltekit — 0204e876 Deployed Nov 2, 2026 by vercel[bot]
Preview – comark-json-render — 0204e876 Deployed Nov 2, 2026 by vercel[bot]
Preview – comark-nextjs — 0204e876 Deployed Nov 2, 2026 by vercel[bot]
Preview – comark-svelte — 0204e876 Deployed Nov 2, 2026 by vercel[bot]
Preview – comark-binding — 0204e876 Deployed Nov 2, 2026 by vercel[bot]
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