kzykhys / Ciconia

A New Markdown parser for PHP5.4
http://ciconia.kzykhys.com/
MIT License
355 stars 31 forks source link

GFM code block cannot work in list items #39

Open breezewish opened 10 years ago

dereuromark commented 10 years ago

It should probably allow nesting/subelements inside list items then.

dereuromark commented 10 years ago

Actually, it seems it does work - however, newlines are required:

- foo
Code?
```

Outputs

<ul>
<li><p>foo</p>

<pre><code>Code?
</code></pre></li>
<li>bar</li>
</ul>
breezewish commented 10 years ago

but it seems that doesn't work on ordered lists:

1. foo
Code?
```
  1. bar

output:

<ol>
<li><p>foo</p>

<p>```<br>
Code?<br>
```</p></li>
<li><p>bar</p></li>
</ol>

BTW.. I implemented php-marked, ported from marked, which doesn't have such issues lol

dereuromark commented 10 years ago

Actually, that is also fixed with my PR https://github.com/kzykhys/Ciconia/pull/41 You may confirm that. Or see the newly added test case.

breezewish commented 10 years ago

Good job! Thank you