# Bug: Markdown Table within Details

**URL:** https://talk.observablehq.com/t/bug-markdown-table-within-details/1995
**Category:** Feedback
**Created:** [May 22, 2019, 10:15pm UTC](https://talk.observablehq.com/t/bug-markdown-table-within-details/1995 "2019-05-22T22:15:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![decentralion](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/decentralion/32/1757_2.png) [@decentralion](https://talk.observablehq.com/u/decentralion)
#### Post date: [May 22, 2019, 10:15pm UTC](https://talk.observablehq.com/t/bug-markdown-table-within-details/1995/1 "2019-05-22T22:15:19Z")

</div>

Consider the following cell:

```auto
md`
<details>
<summary> Foo </summary>

| Table | Example |
| -- | -- |
| one | 1 |
| two | 2 |
</details>`

```

When the details are expanded, I expect it to render a table, like Discourse does:

> **Foo**
>
> | Table | Example |
> | --- | --- |
> | one | 1 |
> | two | 2 |

Instead, it renders the raw text, like so:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/2X/5/50e79981db90b47b8a33b0698d99f4a1699c7a85.png)

See a live repro here: [Bug Repro: Table in Details / Dandelion Mané | Observable](https://observablehq.com/@decentralion/details-in-table-bug-reproduction)

---

<div class="post-metadata">

### Author: ![bgchen](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/bgchen/32/784_2.png) [@bgchen](https://talk.observablehq.com/u/bgchen)
#### Post date: [May 22, 2019, 10:29pm UTC](https://talk.observablehq.com/t/bug-markdown-table-within-details/1995/2 "2019-05-22T22:29:27Z")

</div>

This happens because [Observable’s standard library](https://github.com/observablehq/stdlib/) is using version 0.3.12 of [marked](https://marked.js.org/), check these demo links [(v0.3.12)](https://marked.js.org/demo/?text=%3Cdetails%3E%0A%3Csummary%3E%20Foo%20%3C%2Fsummary%3E%0A%0A%7C%20Table%20%7C%20Example%20%7C%0A%7C%20--%20%7C%20--%20%7C%0A%7C%20one%20%7C%201%20%7C%0A%7C%20two%20%7C%202%20%7C%0A%3C%2Fdetails%3E&options=%7B%0A%20%22baseUrl%22%3A%20null%2C%0A%20%22breaks%22%3A%20false%2C%0A%20%22gfm%22%3A%20true%2C%0A%20%22headerIds%22%3A%20true%2C%0A%20%22headerPrefix%22%3A%20%22%22%2C%0A%20%22highlight%22%3A%20null%2C%0A%20%22langPrefix%22%3A%20%22language-%22%2C%0A%20%22mangle%22%3A%20true%2C%0A%20%22pedantic%22%3A%20false%2C%0A%20%22sanitize%22%3A%20false%2C%0A%20%22sanitizer%22%3A%20null%2C%0A%20%22silent%22%3A%20false%2C%0A%20%22smartLists%22%3A%20false%2C%0A%20%22smartypants%22%3A%20false%2C%0A%20%22tables%22%3A%20true%2C%0A%20%22xhtml%22%3A%20false%0A%7D&version=0.3.12)[(v0.4.0)](https://marked.js.org/demo/?text=%3Cdetails%3E%0A%3Csummary%3E%20Foo%20%3C%2Fsummary%3E%0A%0A%7C%20Table%20%7C%20Example%20%7C%0A%7C%20--%20%7C%20--%20%7C%0A%7C%20one%20%7C%201%20%7C%0A%7C%20two%20%7C%202%20%7C%0A%3C%2Fdetails%3E&options=%7B%0A%20%22baseUrl%22%3A%20null%2C%0A%20%22breaks%22%3A%20false%2C%0A%20%22gfm%22%3A%20true%2C%0A%20%22headerIds%22%3A%20true%2C%0A%20%22headerPrefix%22%3A%20%22%22%2C%0A%20%22highlight%22%3A%20null%2C%0A%20%22langPrefix%22%3A%20%22language-%22%2C%0A%20%22mangle%22%3A%20true%2C%0A%20%22pedantic%22%3A%20false%2C%0A%20%22sanitize%22%3A%20false%2C%0A%20%22sanitizer%22%3A%20null%2C%0A%20%22silent%22%3A%20false%2C%0A%20%22smartLists%22%3A%20false%2C%0A%20%22smartypants%22%3A%20false%2C%0A%20%22tables%22%3A%20true%2C%0A%20%22xhtml%22%3A%20false%0A%7D&version=0.4.0) on the marked library homepage.

There was previously [a thread about problems that occured when upgrading the version of marked](https://talk.observablehq.com/t/md-is-broken/1800/5), but maybe the team will revisit it at some point.

---

<div class="post-metadata">

### Author: ![decentralion](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/decentralion/32/1757_2.png) [@decentralion](https://talk.observablehq.com/u/decentralion)
#### Post date: [May 23, 2019, 7:12am UTC](https://talk.observablehq.com/t/bug-markdown-table-within-details/1995/3 "2019-05-23T07:12:31Z")

</div>

Thanks for the context @bgchen.

---

<div class="post-metadata">

### Author: ![bgchen](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/bgchen/32/784_2.png) [@bgchen](https://talk.observablehq.com/u/bgchen)
#### Post date: [May 23, 2019, 2:50pm UTC](https://talk.observablehq.com/t/bug-markdown-table-within-details/1995/4 "2019-05-23T14:50:35Z")

</div>

Here’s a workaround, by the way:

```auto
md`# Bug Repro: Table in Details

<details>
<summary> Foo </summary>

${md`
| Table | Example |
| -- | -- |
| one | 1 |
| two | 2 |`}
</details>`

```
