Skip to content

feat!: require comark 0.8, whose parser keeps Markdown inside HTML blocks - #75

Merged
vite-hub[bot] merged 9 commits into
mainfrom
chore/comark-0.8
Oct 21, 2026
Merged

vite-hub[bot] merged 9 commits into
mainfrom
chore/comark-0.8

Conversation

@onmax

@onmax onmax commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Moves every package to Comark 0.8.1. Its new token processor (comark#401) fixes comark#235: Markdown after a blank line inside an HTML block now stays inside the block.

<details>
<summary>More</summary>

Hidden **bold**.

</details>
comark Tree
0.7.0 details holds only summary; Hidden bold. is a sibling paragraph after it
0.8.1 details holds summary and the Hidden bold. paragraph

<div align="center"> with Markdown inside behaves the same way.

 # pnpm-workspace.yaml (catalog)
-comark, @comark/html, @comark/vue, @comark/react, @comark/svelte: ^0.7.0
+comark, @comark/html, @comark/vue, @comark/react, @comark/svelte: ^0.8.1

 # packages/*/package.json (peerDependencies)
-"comark": "^0.7.0", "@comark/html": "^0.7.0"
+"comark": "^0.8.0", "@comark/html": "^0.8.0"

Breaking: on 0.x, ^0.7.0 excludes 0.8, so apps need comark 0.8 to install these packages without peer warnings.

pnpm added comark, @comark/html, @comark/vue, and @comark/react 0.8.1 to minimumReleaseAgeExclude because they were published today. Drop those entries once the release is older than the cooldown.

After this merges, #74 can drop its comark#235 note and test a <details> block with Markdown inside.

Test plan

CI runs pnpm ready.

…ocks

Comark 0.8's token processor (comarkdown/comark#401) keeps Markdown written after a blank line inside <details> and <div> instead of after them (comarkdown/comark#235). The peer ranges move from ^0.7.0 to ^0.8.0.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ d6f4d6c 2026-10-21T18:31:01.895Z Visit the dashboard ↗
  • Build: Failed ❌

View logs ↗
ace0382 2026-10-21T18:28:22.977Z View logs ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 83d6492 2026-10-21T18:17:24.083Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 7a94298 2026-10-21T17:53:48.428Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 0a2e967 2026-10-21T15:08:55.349Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 7fdb968 2026-10-21T14:18:43.291Z Visit the dashboard ↗

@vite-hub

vite-hub Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
Session Status Started Duration
Pending Completed Not started —
View session Last seen running 2026-10-21T18:19:17.645Z 0s

Latest result

Pull request merged.

Final answers

Session

Pull request merged.

Session

Waiting for GitHub merge request 14f6281f-2e32-47e2-9eac-ee13dd3610d8.

Session

Fixed Pullfrog P1 by preserving the native overlay context-menu gesture, and repaired the P1 broken lockfile by updating the chips importer to Comark 0.8.1. Frozen install now passes locally. Focused E2E could not start because port 4173 was already occupied. Awaiting current-head checks.

Session

Fixed Pullfrog P1 by preserving the native overlay context-menu gesture, and repaired the P1 broken lockfile by updating the chips importer to Comark 0.8.1. Frozen install now passes locally. Focused E2E could not start because port 4173 was already occupied. Awaiting current-head checks.

Session

Fixed Pullfrog P1: native contextmenu events and browser image actions remain intact while the composed screenshot is temporarily used as the image source. Removed synthetic redispatch and propagation suppression; source attributes restore after disarm. Diff validation passed. Full typecheck was unavailable because workspace package links are unbuilt and prepare cannot write protected Git config.

Session

Fixed Pullfrog P1: native contextmenu events and browser image actions remain intact while the composed screenshot is temporarily used as the image source. Removed synthetic redispatch and propagation suppression; source attributes restore after disarm. Diff validation passed. Full typecheck was unavailable because workspace package links are unbuilt and prepare cannot write protected Git config.

Session

Fixed Pullfrog P1: native contextmenu events and browser image actions remain intact while the composed screenshot is temporarily used as the image source. Removed synthetic redispatch and propagation suppression; source attributes restore after disarm. Diff validation passed. Full typecheck was unavailable because workspace package links are unbuilt and prepare cannot write protected Git config.

Session

Fixed Pullfrog P1: native contextmenu events and browser image actions remain intact while the composed screenshot is temporarily used as the image source. Removed synthetic redispatch and propagation suppression; source attributes restore after disarm. Diff validation passed. Full typecheck was unavailable because workspace package links are unbuilt and prepare cannot write protected Git config.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Comark dependency migration — Updated the workspace catalog, all plugin peer ranges, and lockfile resolutions from Comark 0.7 to 0.8.1.
  • Resolved dependency graph — Refreshed the Comark package snapshots and transitive parser dependencies, including markdown-exit.
  • Release-age policy — Added the newly published Comark 0.8.1 packages to minimumReleaseAgeExclude.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

onmax and others added 4 commits October 21, 2026 16:35
Comark 0.8 writes a fence's `language` and `filename` on a native `pre` as `data-language` and `data-filename`. comark-code's action event read `language` and so sent an empty language, and its Vue, React, and Svelte `Pre` components, which get the raw attributes, wrote `language=` while the HTML renderer wrote `data-language=`. The script now reads `data-language`, and the components map attributes with Comark's own `toNativeAttributes`. The code, include, and tabs tests expect the new `data-*` attributes, which are Comark's intended output (valid HTML).

lint-comark read token types that 0.8 renamed (`mdc_inline_component_open`, `mdc_block_shorthand_open`), so it missed inline and shorthand components. It also looked for `html_block` tokens, which 0.8 turns into paragraphs, and it searched the source for decoded attribute values: `jav&#x61;script:` now reaches the tree as `javascript:`. It now treats only comments and `<pre>`, `<script>`, `<style>`, and `<textarea>` blocks as raw text, and finds an unsafe URL by its written form. The HTML-block test now expects `::note` inside `<div>` to be checked, because 0.8 parses Markdown inside HTML blocks on purpose (comarkdown/comark#235).
…comark#505 is fixed

Comark 0.8 moves inline HTML's text out of the element inside a block component (comarkdown/comark#505). The onerror check still passes; the script check is it.fails, so it flags when Comark fixes the bug.
…ark-0.8

# Conflicts:
#	packages/code/src/client.ts
@vite-hub

vite-hub Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

The required Preview Package publish job is failing inside pkg.pr.new with a reproduced 404: There is no workflow defined for <run id>. The same publish workflow passes on the exact base commit, and check/e2e pass on this head, so no repository defect is indicated. Please retry the pkg.pr.new service/workflow; no code repair is applicable.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Adapted code renderers — Updated the React, Vue, and Svelte renderers and action runtime for Comark 0.8's data-language and data-filename attributes.
  • Updated linter token handling — Classified Comark 0.8 raw HTML and code tokens, adjusted component token types, and preserved source locations for encoded unsafe URLs.
  • Added regression coverage — Covered raw versus Markdown-bearing HTML blocks, framework code output, include output, and the known blocked-script parser limitation.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@pkg-pr-new

pkg-pr-new Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

comark-annotate

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-annotate@75

comark-carousel

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-carousel@75

comark-charts

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-charts@75

comark-chips

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-chips@75

comark-code

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-code@75

comark-embed

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-embed@75

comark-github

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-github@75

comark-icon

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-icon@75

comark-include

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-include@75

comark-linter

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-linter@75

comark-tabs

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-tabs@75

comark-zoom

pnpm add https://pkg.pr.new/onmax/comark-plugins/comark-zoom@75

commit: d6f4d6c

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

The merge commit adds a regression to annotate's context-menu handling: it stops the native contextmenu event and redispatches an untrusted synthetic event, so browser-native image actions are not transferred to the prepared overlay and unrelated page listeners can be skipped.

Reviewed changes

  • Merged current main — Re-reviewed the merge's seven changed files, including the playground copy/reset controls, responsive styling, image decode synchronization, and annotate context-menu forwarding.
  • Added playground editing controls — Added copy and reset actions, confirmation UI, asynchronous load guards, and responsive layout updates.
  • Changed annotate context-menu forwarding — Forwarded context-menu notifications to the composed screenshot overlay while retaining the original event's native default action.

⚠️ Native image actions are not preserved by synthetic forwarding

The new context-menu path suppresses the original event and dispatches a separate MouseEvent on the transparent overlay. dispatchEvent() produces an untrusted event for JavaScript listeners, not a native browser context-menu invocation, so image-specific actions such as Copy Image and Save Image cannot be redirected to the composed screenshot; stopImmediatePropagation() can also prevent unrelated contextmenu listeners from observing the original event.

Technical details
# Preserve native context-menu behavior

## Affected sites
- `packages/annotate/src/client.ts:560-590` — Stops the native `contextmenu` event and redispatches a synthetic event to `armed`, which cannot transfer browser-native default actions and suppresses later listeners.

## Required outcome
- Keep the composed image as the target for browser-native image actions without suppressing unrelated `contextmenu` listeners or relying on an untrusted redispatched event.
- Preserve the existing JavaScript notification behavior for consumers observing `contextmenu`.

## Suggested approach
- Use a mechanism that changes the native hit target before the browser resolves the context menu, or keep the native event's propagation intact and limit any forwarding to the package's own notification path.

## Open questions for the human
- Which browser-native image actions must be supported, and should host `contextmenu` listeners observe the original screenshot or the composed overlay?

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-5.6-sol | 𝕏

@vite-hub

vite-hub Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Addressed Pullfrog’s P1 native context-menu finding in 83d6492: removed synthetic redispatch and propagation suppression, temporarily point the native image at the composed screenshot while the overlay is armed, and leave the original contextmenu event/default actions intact. The overlay remains visible and restores the source attributes after the menu.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Preserved native context-menu actions — Replaced synthetic contextmenu forwarding with an armed overlay and a temporarily blob-backed source image, preserving the composed screenshot for native browser image actions while allowing the event to remain intact.

Pullfrog  | View workflow run | Using gpt-5.6-sol | 𝕏

@vite-hub
vite-hub Bot merged commit b7e7602 into main Oct 21, 2026
8 checks passed
This was referenced Oct 22, 2026
@onmax
onmax deleted the chore/comark-0.8 branch November 1, 2026 11:04
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.

GitHub-style <details> block content is parsed outside the details element

1 participant