# List inserted into middle of paragraph

**URL:** <https://talk.commonmark.org/t/list-inserted-into-middle-of-paragraph/2108>\
**Category:** Spec\
**Created:** [May 26, 2016, 3:16pm UTC](https://talk.commonmark.org/t/list-inserted-into-middle-of-paragraph/2108 "2016-05-26T15:16:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ekrubnivek](https://cdn.commonmark.org/letter_avatar_proxy/v2/letter/e/b9bd4f/32.png) [@ekrubnivek](https://talk.commonmark.org/u/ekrubnivek)\
**Post date:** [May 26, 2016, 3:16pm UTC](https://talk.commonmark.org/t/list-inserted-into-middle-of-paragraph/2108/1 "2016-05-26T15:16:03Z")

</div>

I expect the following text (note newlines at the 80 character mark):

```
This worked for a few months. Unfortunately, occasionally a test would time
out and fail after 18 seconds - maybe 1 in 100 test runs would fail with a
timeout. Normally when the tests fail you get back some kind of error message
- a Postgres constraint failure will print a useful message, or a Javascript
exception will bubble up, or Javascript will complain about an unhandled
rejection.

```

when run through a markdown editor, to generate the following HTML:

```
<p>
This worked for a few months. Unfortunately, occasionally a test would time
out and fail after 18 seconds - maybe 1 in 100 test runs would fail with a
timeout. Normally when the tests fail you get back some kind of error message
- a Postgres constraint failure will print a useful message, or a Javascript
exception will bubble up, or Javascript will complain about an unhandled
rejection.
</p>

```

When I run it through `cmark`, I get the following:

```
<p>This worked for a few months. Unfortunately, occasionally a test would time
out and fail after 18 seconds - maybe 1 in 100 test runs would fail with a
timeout. Normally when the tests fail you get back some kind of error message</p>
<ul>
<li>a Postgres constraint failure will print a useful message, or a Javascript
exception will bubble up, or Javascript will complain about an unhandled
rejection.</li>
</ul>
<p>With this error we didn't get any of those. We also observed it could happen
anywhere - it didn't seem to correlate with any individual test or test file.</p>

```

Which seems incorrect - I definitely don’t want a list to begin in the middle of a paragraph. Is this a problem in the spec or is there something I can do differently to not trigger this behavior?

---

<div class="post-metadata">

**Author:** ![zzzzBov](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/zzzzbov/32/218_2.png) [@zzzzBov](https://talk.commonmark.org/u/zzzzBov)\
**Post date:** [May 27, 2016, 1:50am UTC](https://talk.commonmark.org/t/list-inserted-into-middle-of-paragraph/2108/2 "2016-05-27T01:50:16Z")

</div>

[The spec defines this behavior](http://spec.commonmark.org/0.25/#example-262)

> In CommonMark, a list can interrupt a paragraph. That is, no blank line is needed to separate a paragraph from a following list:

---

<div class="post-metadata">

**Author:** ![ekrubnivek](https://cdn.commonmark.org/letter_avatar_proxy/v2/letter/e/b9bd4f/32.png) [@ekrubnivek](https://talk.commonmark.org/u/ekrubnivek)\
**Post date:** [May 27, 2016, 5:28am UTC](https://talk.commonmark.org/t/list-inserted-into-middle-of-paragraph/2108/3 "2016-05-27T05:28:37Z")

</div>

OK. Guessing there are no options to mitigate it?

---

<div class="post-metadata">

**Author:** ![jgm](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/jgm/32/1360_2.png) [@jgm](https://talk.commonmark.org/u/jgm)\
**Post date:** [May 31, 2016, 7:47pm UTC](https://talk.commonmark.org/t/list-inserted-into-middle-of-paragraph/2108/4 "2016-05-31T19:47:38Z")

</div>

Please see the thread

> [@Blank lines before lists, revisited](https://talk.commonmark.org/t/blank-lines-before-lists-revisited/1990):
>
> Currently CommonMark does not require a blank line between a regular paragraph and a list. In this respect [it differs from most current implementations](http://johnmacfarlane.net/babelmark2/?normalize=1&text=Albert+Einstein+was+born+in+1879+and+died+in%0A1955.++He+was+a+theoretical+physicist.%0A). John Gruber made his intentions clear on this, too; although the syntax description says nothing about it, the test suite includes the following: In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. Here's one with a bullet. \* criminey. I…

and comment there if you like.
