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

Wrong list parsing #30

Open
DarkFighter opened this issue Dec 26, 2013 · 3 comments
Open

Wrong list parsing #30

DarkFighter opened this issue Dec 26, 2013 · 3 comments

Comments

@DarkFighter
Copy link

Input:

- item1
- item2
- item3

test
1. item1
2. item2
3. item3

* item1
* item2
* item3

Output:

<ul> <li>item1</li> <li>item2</li> <li>item3</li> </ul> <p>test</p> <ol> <li>item1</li> <li>item2</li> <li><p>item3</p></li> <li><p>item1</p></li> <li>item2</li> <li>item3</li> </ol>
@DarkFighter
Copy link
Author

ok, here is my dirty solution: https://gist.github.com/DarkFighter/0095077337449fdfe1ba
it works but strange situations with lists are still possible

@kzykhys question: why do we need $this->markdown->emit('block') in processListItems method?

@kzykhys and yes, more tests are needed

@kzykhys
Copy link
Owner

kzykhys commented Dec 27, 2013

why do we need $this->markdown->emit('block') in processListItems method?

* a list item can contain
   > block elements

Tested with your input on http://ciconia.kzykhys.com/ :

<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>

<p>test<br>
1. item1<br>
2. item2<br>
3. item3</p>

<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>

Are you using 1.0.x ?

@DarkFighter
Copy link
Author

yes, i'm using 1.0.1

this code works wrong:

1. item1
 1. asd
  1.asdsad
  2. ddd
 2. ddd
2. item2
3. item3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants