Markdown preview issue - Codeblock inside details section

Bug report

Codeblock inside <details> not working.

For example.

<details>
  <summary>Click here for details...</summary>
  
  ```json
{
	"foo": "bar"
}
```

What the output should be:

Click here for details...
{
  "foo": "bar"
}

What i see in the preview:

image

Normal codeblocks are working but codeblocks inside a details section not.

The html from the devtools:
image

Environment

  • Platform: Windows
  • Platform version: 11
  • App Version: LATEST

Hi Rick,

You have to remove the 2 whitespaces at line 3 from the example.

<details>
  <summary>Click here for details...</summary>

  ```json
{
"foo": "bar"
}
  ```
</details>

yields:

It is type 7 of the HTML blocks of CommonMark:

https://spec.commonmark.org/0.29/#html-blocks

1 Like