You need blank lines above and below the details block. Looks like you need blank lines above and below the code block too. Let me see…
details go here
This text will not be visible until you expand the spoiler.
it also works with blurred text
this is code
Like so?
[details=details go here]
This text will not be visible until you expand the spoiler.
[spoiler]it also works with blurred text[/spoiler]
```
this is code
```
[/details]
This text will not be visible until you expand the spoiler.
it also works with blurred text
this is code
Yes this seems fine now that we have commonmark @Nick_Winter .
raw
[details=details go here]
This text will not be visible until you expand the spoiler.
[spoiler]it also works with blurred text[/spoiler]
```
this is code
```
[/details]