locopablo / markdownsharp

Automatically exported from code.google.com/p/markdownsharp
0 stars 0 forks source link

Strange behaviour of the ordered/unordered lists #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Passing this text

    - lion
    - tiger
    - cougar
    - smilodon
    - Garfield

    1. London
    2. Paris
    3. Barcelona
    4. Kraków

I'm getting this beauty

    <ul>
    <li>lion</li>
    <li>tiger</li>
    <li>cougar</li>
    <li>smilodon</li>
    <li><p>Garfield</p>

    <ol>
    <li>London</li>
    <li>Paris</li>
    <li>Barcelona</li>
    <li>Kraków</li>
    </ol></li>
    </ul>

... although I am expecting something more conventional:

    <ul>
    <li>lion</li>
    <li>tiger</li>
    <li>cougar</li>
    <li>smilodon</li>
    <li>Garfield</li>
    </ul>

    <ol>
    <li>London</li>
    <li>Paris</li>
    <li>Barcelona</li>
    <li>Kraków</li>
    </ol>

I am not sure whether it is a bug or just a feature. Trying to solve it alone 
but if someone knows the right direction I'd be *very* grateful.

Thanks in advance

Original issue reported on code.google.com by Lord.ind...@gmail.com on 25 Jan 2011 at 12:57

GoogleCodeExporter commented 9 years ago
most Markdown parsers don't handle this well

http://goo.gl/5Bqka

Original comment by wump...@gmail.com on 28 Feb 2011 at 5:03

GoogleCodeExporter commented 9 years ago
Line 1174 of the "Markdown.cs":

Change from "\n{{2,}}" to "\n{{2,}}|\Z" would fix this.

Original comment by Lord.ind...@gmail.com on 28 Nov 2011 at 10:35