Skip to content

WIP: refactor: markdown-exit token processor - #401

Open
farnabaz wants to merge 35 commits into
mainfrom
feat/html-block-2
Open

farnabaz wants to merge 35 commits into
mainfrom
feat/html-block-2

Conversation

@farnabaz

@farnabaz farnabaz commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

What

Refactor markdown-exit token list to Comark tree logic

Why

The new logic's goal it to be simpler and support html tokens

Summary by CodeRabbit

  • New Features

    • HTML content can be parsed with Markdown enabled by default or preserved literally with markdown: false.
    • Added safer tree traversal with a maximum depth limit.
    • Improved handling of nested HTML, components, incomplete blocks, inline elements, attributes, and Markdown round-tripping.
  • Changes

    • Heading IDs now omit inline component names and use updated slugs.
    • The public applyAutoUnwrap export is no longer available.
  • Documentation & Tests

    • Expanded specifications and coverage for HTML, components, auto-closing, escaping, and nested structures.

@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

◈ PR Lens

Note

This drawing shows c50ef09, and the branch has new commits since. Tick Redraw to draw the latest one

  • Redraw

🟢 +2 new · 🟠 ~3 changed · 🔴 -1 removed · 1 flow · 14 files · commit c50ef09


Architecture

Architecture diagram for comarkdown/comark at c50ef09

6 components touched across 5 lanes.

Open the interactive canvas


Inside the changed components — 2 views

Component view — Core AST Engine

The stack-based tree builder replacing the legacy token processor

Architecture view of Component view — Core AST Engine in comarkdown/comark

Component view — HTML & Plugin Pipeline

HTML block tokenization and component open/close token handling

Architecture view of Component view — HTML & Plugin Pipeline in comarkdown/comark

Data flow

Data flow diagram for comarkdown/comark at c50ef09

Markdown to AST Parsing Pipeline

Open the interactive canvas


View

  • Architecture lens
  • Data flow lens
  • Expand every detail

Tip

Untick Architecture lens or Data flow lens under View to hide a diagram, or tick Expand every detail to open every section. The comment redraws in a few seconds.

🪧 More tips
  • 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."
  • 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 github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture and data flow row. Drawing still runs on every push.
  • 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.
  • Push a commit and the comment redraws for the new head. A slow older run never overwrites a newer one.
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion.

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

❤️ Share

@vercel

vercel Bot commented Sep 8, 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 Oct 2, 2026 4:51pm UTC
comark-binding Ready Ready Preview Oct 2, 2026 4:51pm UTC
comark-json-render Ready Ready Preview Oct 2, 2026 4:51pm UTC
comark-nextjs Ready Ready Preview Oct 2, 2026 4:51pm UTC
comark-nuxt Ready Ready Preview Oct 2, 2026 4:51pm UTC
comark-svelte Ready Ready Preview Oct 2, 2026 4:51pm UTC
comark-sveltekit Ready Ready Preview Oct 2, 2026 4:51pm UTC
comark-twoslash Ready Ready Preview Oct 2, 2026 4:51pm UTC
comark-vue Ready Ready Preview Oct 2, 2026 4:51pm UTC

@pkg-pr-new

pkg-pr-new Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark

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

@comark/angular

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

@comark/ansi

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

@comark/html

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

@comark/nuxt

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

@comark/react

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

@comark/svelte

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

@comark/vue

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

commit: a99a99d

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Documentation previews

📚 Preview all documentation changes (follows new pushes)

Pinned to the current head: a99a99d

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

✅ Bundle snapshot updated

Committed the new snapshot as e3e79b1, verified by re-running the bundle check against it.

GitHub suppresses the events a workflow commit would normally raise, so the ci check above may
still show the earlier failure. Re-run it to refresh the status — the snapshot itself is confirmed green.

Produced by this run.

This branch was successfully deployed

9 active (1 outdated) deployments
Preview – comark-json-render — e3e79b13 Deployed Oct 2, 2026 by vercel[bot]
Preview – comark-sveltekit — e3e79b13 Deployed Oct 2, 2026 by vercel[bot]
Preview – comark-nuxt — e3e79b13 Deployed Oct 2, 2026 by vercel[bot]
Preview – comark-twoslash — e3e79b13 Deployed Oct 2, 2026 by vercel[bot]
Preview – comark-vue — e3e79b13 Deployed Oct 2, 2026 by vercel[bot]
Preview – comark-nextjs — e3e79b13 Deployed Oct 2, 2026 by vercel[bot]
Preview – comark-binding — e3e79b13 Deployed Oct 2, 2026 by vercel[bot]
Preview – comark-svelte — e3e79b13 Deployed Oct 2, 2026 by vercel[bot]
Preview – comark — 19d0ddc7 Deployed Sep 9, 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.

1 participant