Hi,

After I upgraded from Pandoc 1.19 to 2.0, I was surprised that my fenced code blocks under list items no longer worked:

- Item One.

- Item Two.

   
```
    Code
    ```


I was expecting it to be translated to

<ul>
<li><p>Item One.</p></li>
<li><p>Item Two.</p>
<pre><code>Code</code></pre></li>
</ul>

but it wasn't (there was no <pre></pre>). I read the release notes, and it took me quite a while to realize that I had to indent by two spaces in this case to line up with the list content:

- Item One.

- Item Two.

 
```
  Code
  ```

The reason that the previous Markdown example was not recognized as a fenced code block under a list item was that the four spaces = two spaces (to line up with list) + two spaces, and the latter two spaces turned the "fenced code block" into a paragraph:

  ```
  Code
  ```


<p><code>Code</code></p>

Then I checked with Pandoc 1.19 again and realized it was also the case there. Everything is clear to me now, but it is still surprising to me that the two spaces before a fenced code block are actually meaningful.

BTW, I'm aware of the four_space_rule extension (which is disabled by default).

Yihui

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/573489f2-ba60-4239-9c21-3159bd78ff8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.