[details] plugin working while editing but not when posted

See this post. The [details] content shows up even before clicking to expand. While editing, it works.

While editing, it works (see here).

Possibly something to do with the multiple types of things we’re putting in the [details] block, including [spoiler] and a code block?

2 Likes

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]

It does need a blank line above the start block and below the end block to work.


This seems to be the real bug that everyone is reporting. Details work. But why does the preview render differently than the cooked post?

1 Like

No, try it yourself. This is a different issue having to do with the code block inside. I had to add blank lines near the code block.

I’m not disagreeing about the blank lines needed. When I remove the blank lines, here’s what the preview looks like (it appears to work):

details go here

This text will not be visible until you expand the spoiler.

it also works with blurred text

this is code

However, once posted the cooked post does not match the preview.

I got markdown-it-review on this for a reason :wink:

3 Likes

Let’s see if this works any better now:

details go here

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]
5 Likes