Users report that the [details] plugin displays content prematurely when posted, despite working correctly in edit mode Nick_Winter. codinghorror suggests adding blank lines around the [details] block and code blocks to fix rendering, but notes the issue may stem from nested elements like [spoiler] and code. jomaxro confirms blank lines are required and highlights the core bug: preview and cooked post render differently. codinghorror and jomaxro further test and agree that while blank lines help, the mismatch between preview and final output persists. sam tags the issue for markdown-it-review. Finally, codinghorror confirms the issue is resolved under CommonMark, noting the [details] block now renders correctly both in preview and when posted.
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]