Code Block inclusion inside details section

I found this template for details :

<details>
	<summary>Collapse / Expand</summary>
	Content goes here, something like<br>
</details>

it did work but now I want to include code block like the following :

<details>
	<summary>Collapse / Expand</summary>
	Content goes here, something like<br>
	```text<br>
	test<br>
	```<br>
	1. Something
	2. Something 
	3. Something..
</details>

it didn’t work, how ? Your help would be appreciated !

Wouldn’t it be better to use a callout?

> [info!]+ Summary/expand 
> more text and markdown formatting 
>
>```js
>  console.log("hello world")
>```

Then you would be able to include all sorts of markdown, and they call be styled in all sorts of ways, with current icons and whatnot.