# HTML \<details\> require an empty line before markdown blocks

**URL:** <https://meta.discourse.org/t/html-details-require-an-empty-line-before-markdown-blocks/335019>\
**Category:** Product Support\
**Created:** [November 7, 2024, 6:52pm UTC](https://meta.discourse.org/t/html-details-require-an-empty-line-before-markdown-blocks/335019 "2024-11-07T18:52:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [November 8, 2024, 2:54am UTC](https://meta.discourse.org/t/html-details-require-an-empty-line-before-markdown-blocks/335019/3 "2024-11-08T02:54:35Z")

</div>

Yeah, this is not a bug, this is the [common mark spec](https://spec.commonmark.org/)

When mixing and matching HTML and markdown you need an extra newline.

This monster works with no newlines, but I would recommend just using the BBCode that @Heliosurge suggested.

```plaintext
<details>
<pre>
<code># yes code
</pre>
</code>
</details>

```

---

_[View the full topic](https://meta.discourse.org/t/html-details-require-an-empty-line-before-markdown-blocks/335019)._
