# Details markup not working correctly in messages

**URL:** <https://meta.discourse.org/t/details-markup-not-working-correctly-in-messages/52967>\
**Category:** Bug\
**Tags:** markdown-it-review\
**Created:** [November 16, 2016, 1:43pm UTC](https://meta.discourse.org/t/details-markup-not-working-correctly-in-messages/52967 "2016-11-16T13:43:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Wright](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexander_wright/32/119518_2.png) [@Alexander\_Wright](https://meta.discourse.org/u/Alexander_Wright)\
**Post date:** [November 16, 2016, 1:43pm UTC](https://meta.discourse.org/t/details-markup-not-working-correctly-in-messages/52967/1 "2016-11-16T13:43:21Z")

</div>

Using the `[details=Summary]This text will be hidden[/details]` in a private message results in the Summary drop down appearing correctly, but the hidden text appearing immediately below, and not hidden as it would be in a topic post.

It does, however, work in the markup editor when you are writing the message.

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [November 16, 2016, 1:45pm UTC](https://meta.discourse.org/t/details-markup-not-working-correctly-in-messages/52967/2 "2016-11-16T13:45:51Z")

</div>

I don’t think the issue is related to PM but rather the formatting of your post. Can you share the markup you’re having trouble with?

---

<div class="post-metadata">

**Author:** ![Alexander\_Wright](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexander_wright/32/119518_2.png) [@Alexander\_Wright](https://meta.discourse.org/u/Alexander_Wright)\
**Post date:** [November 16, 2016, 1:48pm UTC](https://meta.discourse.org/t/details-markup-not-working-correctly-in-messages/52967/3 "2016-11-16T13:48:25Z")

</div>

Yes as follows:

```
Finally, you can use the following form to encapsulate longer examples or inclusions to make the discussion easier to follow.

Typing this:

`[details=Summary]This text will be hidden[/details]`

Results in this:
[details=Summary]This text will be hidden[/details]

```

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [November 16, 2016, 1:50pm UTC](https://meta.discourse.org/t/details-markup-not-working-correctly-in-messages/52967/4 "2016-11-16T13:50:24Z")

</div>

Try adding new lines around the BBCode tags 😉

---

<div class="post-metadata">

**Author:** ![Alexander\_Wright](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexander_wright/32/119518_2.png) [@Alexander\_Wright](https://meta.discourse.org/u/Alexander_Wright)\
**Post date:** [November 16, 2016, 1:52pm UTC](https://meta.discourse.org/t/details-markup-not-working-correctly-in-messages/52967/5 "2016-11-16T13:52:04Z")

</div>

> [@zogstrip](#):
>
> Try adding new lines around the BBCode tags 😉

Ahh, that works. It did still display correctly in the editor though, so a bug for being inconsistent, if nothing else!

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [November 16, 2016, 1:53pm UTC](https://meta.discourse.org/t/details-markup-not-working-correctly-in-messages/52967/6 "2016-11-16T13:53:01Z")

</div>

It will be fixed once we switch to a newer markdown engine 😉

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [June 26, 2017, 8:05pm UTC](https://meta.discourse.org/t/details-markup-not-working-correctly-in-messages/52967/7 "2017-06-26T20:05:04Z")

</div>

We “fix” this by correctly handling details now! [details=Summary]This text will not be hidden[/details]

> **why you wonder?**
>
> Because details is a “block” level construct, we never meant to support it inline. That was a bug.

> [@CommonMark testing started here!](https://meta.discourse.org/t/commonmark-testing-started-here/65121):
>
> Per our [migration plans](https://meta.discourse.org/t/discourse-commonmark-migration-plans-confetti-ball-balloon), I just enabled [markdown.it](https://github.com/markdown-it/markdown-it) at Meta. It is an excellent [CommonMark](http://commonmark.org/) compliant engine. I expect quite a few edges to be found during this period of testing. Do not open bugs about the new Engine, just reply here. I/we will be updating the top post here with the list of issues and striking out stuff as it is fixed. Current known issues (to be fixed)white_check_mark Onebox vanishes after you start typing and works not-super consistently white_check_mark pending…

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [June 26, 2017, 8:05pm UTC](https://meta.discourse.org/t/details-markup-not-working-correctly-in-messages/52967/8 "2017-06-26T20:05:14Z")

</div>


