-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
2 extra leading spaces in code blocks that are within list-items #227
Comments
Marked list parsing is a bit smarter than markdown.pl when it comes to the list "margin". If you want original markdown.pl behavior, you can use the 1. foo
bar
* * *
* foo
bar |
I still think it's a bug (though not a critical one):
is compiled to :
the extra 2 leading spaces are there |
It's not a bug. This is how marked behaves. If you want the original markdown.pl behavior, you can pass |
OK.. I guess I want the pedantic behavior (though I don't like that it's called that way..:) |
Here's a better example of what I was talking about: $ marked
* hello
world
* hello
world
^D
<ul>
<li><p>hello</p>
<pre><code>world</code></pre>
<ul>
<li><p>hello</p>
<pre><code>world</code></pre>
</li>
</ul>
</li>
</ul> |
pedantic flag gives me spaces in the end of the code though.. but in any case, I got what you meant, I will manage. |
@chjj I agree with @amitport. Could we have an option that turns only this single pedantic behavior on? Advantages of the original:
This means that people coming from other engines to Marked will have problems. Tested with karlcow/markdown-testsuite#34 Same discussion for Kramdown: gettalong/kramdown#121 |
@cirosantilli, I realize people do sometimes only want certain aspects of original markdown behavior. The I do want to split As for making this the default, it will be hard to convince myself. I really really really dislike the original markdown list behavior and I think it's counterintuitive. I'm willing to bet most people actually instinctively used marked-like list syntax for indentation when using markdown for the first time. I don't have any real evidence for this, but I don't agree when you say it's simpler. |
when indenting a code block with x+1 tabs after a level x list-item the code block renders with two extra leading spaces at each line
The text was updated successfully, but these errors were encountered: