Closed borisovg closed 10 years ago
Similarly, and worse altogether, this produces broken code as well:
1. line 1
2. line 2
* line 3
* line 4
This really really needs fixed.
This behaviour is consistent with most other markdown implementations, including the original: http://johnmacfarlane.net/babelmark2/?normalize=1&text=*+line+1%0A*+line+2%0A%0A*+line+3%0A*+line+4
If this behaviour is clearly broken then why not fix it?
Primarily because it follows a principle of least surprise. Markdown is a format implemented widely, by many other libraries than markdown-js, and people have an expectation that they are all implementing a common standard (even though the standard contains plenty of quirks, like this one). Matching the consensus (and especially the original) helps with that, except where the behaviour is really off the rails.
A second reason for this particular example is that I cannot see a solid use case for wanting multiple consecutive lists that aren't separated by other elements (such as a paragraph or a heading).
Single list:
produces
But 2 lists in a row:
produces