posit-dev / posit-dev/positron

Block-level HTML tags in notebook markdown cells render incorrectly

Open
#16,111 1 comment 0 reactions 1 assignee View on GitHub

@dhruvisompura is already working on this.

Since Sep 18, 2026.

area: notebooks-jupyter bug theme: new notebook frontend
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.