# 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:** 1

<div class="post-metadata">

**Author:** ![mbauman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbauman/32/139835_2.png) [@mbauman](https://meta.discourse.org/u/mbauman)\
**Post date:** [November 7, 2024, 6:52pm UTC](https://meta.discourse.org/t/html-details-require-an-empty-line-before-markdown-blocks/335019/1 "2024-11-07T18:52:01Z")

</div>

It’d be nice if Markdown’s “block” syntaxes could work inside `<details>` without requiring an empty line. I frequently run into this with code segments. For example, this fairly straight-forward syntax is doesn’t render as I’d expect:

````md
<details>
```
# not code
```
</details>

````

> ****
>
> ``` # not code ```

While I most commonly hit this with code blocks (given that we run a programming language forum), it’s true of other markdown “block” syntaxes:

> **For example, headers**
>
> # are not headers
> 
> This is the code for this block:
> 
> ````md
> <details><summary>For example, headers</summary>
> # are not headers
> 
> This is the code for this block:
> ```md
> (stack overflow)
> ```
> </details>
> 
> ````

> **And same for block quotes**
>
> \> this should be a quote, I'd expect

Is this expected?

---

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