vmg / redcarpet

The safe Markdown parser, reloaded.
MIT License
4.99k stars 527 forks source link

Headers in list items do not render AT ALL #483

Open nijikokun opened 9 years ago

nijikokun commented 9 years ago
  1. Testing

    this should work

  2. Testing Again

When there is content indented between list items, headers should render properly, but redcarpet does not follow this pattern at all. The above is an example of this usage. The example below is what redcarpet does:

As you can see it not only does not render the list properly it also does not parse headers. I am currently facing this issue and was wondering if there is something I could down now perhaps a custom cooked plugin for redcarpet that deals with this?

nijikokun commented 9 years ago

I have found the issue, it requires 4 spaces, instead of the common 2 or 3 to avoid issues with code blocks.

nijikokun commented 9 years ago

Alright, so it halfway works:

view issue

If someone can spot what I am doing wrong that would be great:

view code spacing

I have tried removing the spaces so all content touches the base number line, that does not work, I tried everything at 2 spaces, nope, 3 spaces, nope.

To get the second list to work it must be at 2 spaces not 4 otherwise it becomes a code block...

The issue is due to the code block (because it is at 4 spaces, but when it is at 2 spaces the issue still persists because it is no longer nested inside of the parent list.)

Note: the second list is not a part of the parent list, it is a part of the nested content.

nijikokun commented 9 years ago

setting disable_indented_code_block to true does not fix the issue, however it may be that the version in jekyll (which I am led to believe is v2.2.2 does not support this flag)

nijikokun commented 9 years ago

This doesn't work at all with:

- A

  Some text here

- B

  Some more text here