Repository navigation
feat!: require comark 0.8, whose parser keeps Markdown inside HTML blocks - #75
Conversation
…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.
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
Latest result Pull request merged. Final answersSession 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. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Comark dependency migration — Updated the workspace catalog, all plugin peer ranges, and lockfile resolutions from Comark
0.7to0.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.1packages tominimumReleaseAgeExclude.
gpt-5.6-sol | 𝕏
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: `javascript:` 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
|
The required Preview Package publish job is failing inside pkg.pr.new with a reproduced 404: |
There was a problem hiding this comment.
✅ 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-languageanddata-filenameattributes. - 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.
gpt-5.6-sol | 𝕏
comark-annotate
comark-carousel
comark-charts
comark-chips
comark-code
comark-embed
comark-github
comark-icon
comark-include
comark-linter
comark-tabs
comark-zoom
commit: |
There was a problem hiding this comment.
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?gpt-5.6-sol | 𝕏
|
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. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Preserved native context-menu actions — Replaced synthetic
contextmenuforwarding 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.
gpt-5.6-sol | 𝕏

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.
detailsholds onlysummary;Hidden bold.is a sibling paragraph after itdetailsholdssummaryand theHidden bold.paragraph<div align="center">with Markdown inside behaves the same way.Breaking: on 0.x,
^0.7.0excludes 0.8, so apps need comark 0.8 to install these packages without peer warnings.pnpm added
comark,@comark/html,@comark/vue, and@comark/react0.8.1 tominimumReleaseAgeExcludebecause 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.