textile / php-textile

Textile markup language parser for PHP
https://textile-lang.com
Other
216 stars 44 forks source link

Too many <p> tags #99

Closed eliph closed 11 years ago

eliph commented 11 years ago

According to the specifications:

https://github.com/textile/textile-spec/blob/master/html.yaml

the shopping cart example:

<div id="shopping-cart">
<form action="form_action" method="get">

h3. Your cart

* Item one
* Item two

<p><input type="submit" value="Check Out" /></p>

</form>
</div>

should be transformed into:

<div id="shopping-cart">
<form action="form_action" method="get">
<h3>Your cart</h3>
<ul>
     <li>Item one</li>
     <li>Item two</li>
</ul>
<p><input type="submit" value="Check Out" /></p>
</form>
</div>

But with Textile 2.5 some unnecessary <p> tags are being added:

<p><div id="shopping-cart"><br />
<form action="form_action" method="get"><br /></p>
<h3>Your cart</h3>
    <ul>
        <li>Item one</li>
        <li>Item two</li>
    </ul>
<p><input type="submit" value="Check Out" /></p>
<p></form><br />
</div></p>
netcarver commented 11 years ago

Hi Eliph, thanks for the report, nice to see you back. I think this is already covered by code I'm working on for #63. Closing it as a duplicate.