# Bug when putting code between two fenced code blocks?

**URL:** https://meta.discourse.org/t/bug-when-putting-code-between-two-fenced-code-blocks/38626
**Category:** Bug
**Tags:** markdown-it-review
**Created:** [January 28, 2016, 12:46pm UTC](https://meta.discourse.org/t/bug-when-putting-code-between-two-fenced-code-blocks/38626 "2016-01-28T12:46:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wil93](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wil93/32/121264_2.png) [@wil93](https://meta.discourse.org/u/wil93)
#### Post date: [January 28, 2016, 12:46pm UTC](https://meta.discourse.org/t/bug-when-putting-code-between-two-fenced-code-blocks/38626/1 "2016-01-28T12:46:44Z")

</div>

Hi, I think there is a bug with the editor/renderer when putting markdown code between two fenced code blocks. I tried the following code on [try.commonmark.org](http://try.commonmark.org) and it gives correct output, but here it is:

```c++
int main() {
    return 0;
}

```

Paragraph

# header

- list

- of

- things

Another paragraph

```c++
int main() {
    return 0;
}

```

Paragraph

# header

- list

- of

- things

Another paragraph

* * *

For reference, this is what I see in the preview dialog:

 ![](https://global.discourse-cdn.com/meta/original/3X/e/7/e72b8dbdd907256d0dbd294ebf077699773940b8.png)

---

<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: [January 28, 2016, 2:58pm UTC](https://meta.discourse.org/t/bug-when-putting-code-between-two-fenced-code-blocks/38626/2 "2016-01-28T14:58:53Z")

</div>

This is a known issue and will be fixed when we migrate to common markdown 😉

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 28, 2016, 4:53pm UTC](https://meta.discourse.org/t/bug-when-putting-code-between-two-fenced-code-blocks/38626/3 "2016-01-28T16:53:00Z")

</div>


