posit-dev / posit-dev/positron
Block-level HTML tags in notebook markdown cells render incorrectly
@dhruvisompura is already working on this.
Since Sep 18, 2026.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 183
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
Description
Block-level HTML elements like <details> and <summary> don't render correctly in notebook markdown cells. Content that should be hidden behind a collapsible disclosure is always visible.
This happens because marked splits block-level HTML into separate tokens when blank lines appear inside them. The split tokens render as siblings instead of as children of the outer element.
For example, this markdown:
<details>
<summary>Click to expand</summary>
Hidden content here
</details>
renders with "Hidden content here" always visible, outside the <details> element.
A secondary issue: double-clicking the <details> disclosure arrow enters edit mode instead of toggling the disclosure twice.
Expected behavior
- Block-level HTML elements render as a single grouped element, matching JupyterLab and Marimo
<details>content is hidden by default and revealed on click- Double-clicking the disclosure arrow toggles it without entering edit mode
Environment
Positron (main branch)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.