redcarpet icon indicating copy to clipboard operation
redcarpet copied to clipboard

3rd level lists become 2nd level ul lists.

Open postmodern opened this issue 12 years ago • 14 comments

I noticed that 3rd level nested lists are emitted as 2nd level <ul> lists.

  • https://raw.github.com/postmodern/ruby-install/master/ChangeLog.md
  • https://github.com/postmodern/ruby-install/blob/master/ChangeLog.md#010--2013-05-28

Tested on RedCarpet 2.2.2 and 2.3.0. Kramdown correctly nests 3rd nested level lists.

redcarpet ChangeLog.md > ChangeLog.redcarpet.html
firefox ChangeLog.redcarpet.html
kramdown -i markdown -o html <ChangeLog.md >ChangeLog.kramdown.html
firefox ChangeLog.kramdown.html

postmodern avatar May 29 '13 00:05 postmodern

See #115 where @vmg commented about a year ago on this, although things may have changed.

aprescott avatar May 29 '13 12:05 aprescott

I think that this is not itended because 3rd level lists should be 3rd level lists ; lists should be considered as third level ones starting from the 4th level, no? However, if it is the expected behaviour, I personally think that 2 is not enough and we should also add an option to allow the user to choose its own maximum nesting level.

robin850 avatar May 29 '13 17:05 robin850

From #115, looks like max_nesting is a C-related thing to achieve that, although obviously Ruby bindings would be another thing. (I might be talking nonsense...)

aprescott avatar May 29 '13 17:05 aprescott

max_nesting is not an appropriate solution, since GitHub sets that value.

postmodern avatar May 29 '13 23:05 postmodern

Are you trying to fix a GitHub markdown issue by getting it fixed in Redcarpet? GitHub doesn't use Redcarpet, unless you mean something else.

aprescott avatar May 29 '13 23:05 aprescott

(I also didn't mean that max_nesting would be a fix for you as a user, by the way, I just wanted to throw it in as a pointer in case anyone else was going to fix it. I think 2-3 levels is probably not enough for a lot of people, and is a bit unsatisfactory.)

aprescott avatar May 29 '13 23:05 aprescott

Last I heard, GitHub was still using RedCarpet. 2-3 levels is extremely low, also I question the reasoning behind not allowing arbitrary nesting. To my knowledge, no other markdown parser has had issues with arbitrarily nested lists.

postmodern avatar May 30 '13 00:05 postmodern

GitHub is no longer using Redcarpet. They're using something different now that is derived from Redcarpet's code.

On Wed, May 29, 2013 at 7:16 PM, Postmodern [email protected]:

Last I heard, GitHub was using RedCarpethttps://github.com/blog/832-rolling-out-the-redcarpet. 2-3 levels is extremely low, also I question the reasoning behind not allowing arbitrary nesting. To my knowledge, no other markdown parser has had issues with arbitrarily nested lists.

— Reply to this email directly or view it on GitHubhttps://github.com/vmg/redcarpet/issues/254#issuecomment-18654425 .

mattr- avatar May 30 '13 01:05 mattr-

@mattr- Ah. Still, they are using RedCarpet's code-base. Not sure if they pull in upstream patches from RedCarpet.

postmodern avatar May 30 '13 02:05 postmodern

I might be missing something, but I was able to get a 3rd level nesting by adding an additional tab on 3rd level content. See here: https://github.com/derecom/openwrt_builder/blob/master/README.md https://raw.github.com/derecom/openwrt_builder/master/README.md

stefanozanella avatar Jun 11 '13 16:06 stefanozanella

Any updates on this? I'm also running into this issue.

gilbert avatar Sep 24 '13 19:09 gilbert

Ran into this issue on https://github.com/olivierlacan/keep-a-changelog/issues/38

@robin850 I'd love to help on this.

olivierlacan avatar Dec 13 '14 01:12 olivierlacan

Interestingly GitHub's Markdown parser deals with nested lists properly.

image

@vmg any time to share? :smile:

olivierlacan avatar Dec 13 '14 06:12 olivierlacan

@olivierlacan GitHub hasn't used Redcarpet in production for a long time. See https://github.com/vmg/redcarpet/issues/212.

aprescott avatar Dec 13 '14 17:12 aprescott