Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marku doesn't recognize lists with two or three spaces before the list mark #30

Closed
weakish opened this issue Feb 9, 2011 · 2 comments
Closed
Labels
Milestone

Comments

@weakish
Copy link

weakish commented Feb 9, 2011

Quoted from markdown syntax:

List markers typically start at the left margin, but may be indented by up to three spaces.

But Marku only recognizes lists indented by zero or one space.

Example:

This is a list:

* a list

This is a list, too:

 * another list

But this is also a list:

  * yet another list

And this:

   * still a list
@stomar
Copy link
Contributor

stomar commented Sep 5, 2012

Confirmed for the current version of maruku.
Reason lies in `lib/maruku/input/type-detection.rb' (line 60ff.):

# Something is wrong with how we parse lists! :-(
#return :ulist    if l =~ /^[ ]{0,3}([\*\-\+])\s+.*\w+/
#return :olist    if l =~ /^[ ]{0,3}\d+\..*\w+/
return :ulist    if l =~ /^[ ]{0,1}([\*\-\+])\s+.*/
return :olist    if l =~ /^[ ]{0,1}\d+\.\s+.*/

The regexes accept only one or two leading spaces.

PS. Simply changing {0,1} to {0,3} or using the commented out lines breaks some test cases.

PPS. kramdown, pandoc, and the "original" Markdown.pl all work as expected.

bhollis added a commit that referenced this issue Feb 18, 2013
bhollis added a commit that referenced this issue Feb 20, 2013
This removes the :li_span element type, and fixes how Maruku chooses to wrap list items in paragraphs in many cases (though not all). There are still quite a few list cases that still fail, but this fixes #26, fixes #30, fixes #64, fixes #67, and fixes #72, and activates many of the pending list tests.
@tschaub
Copy link

tschaub commented Jun 25, 2013

Is it possible with maruki 0.6.0 to create a nested list? I left a comment on #55 with the syntax I'm trying. Can't seem to find the magic indentation to create proper nested lists.

stomar pushed a commit to stomar/maruku that referenced this issue Apr 30, 2014
This test *should* fail. See
bhollis#30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants