textile / php-textile

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

br tag being inserted after final unordered list item #177

Closed dmagoo closed 7 years ago

dmagoo commented 7 years ago

Tis can be reproduced as follows:

$input = "
*This is my header*
* here is an item
* and another";

echo textile($input);

Output:

<p><strong>This is my header</strong><br />
  <ul>
    <li>here is an item</li>
    <li>and another</li><br />
  </ul></p>
eliph commented 7 years ago

Try inserting a newline:

*This is my header*

* here is an item * and another";

netcarver commented 7 years ago

As eliph said. This is currently a limitation in php textile as the list block needs to be separated from the preceding block. This is a duplicate of #22 so closing this issue.

dmagoo commented 7 years ago

Fair enough, but it isn't a dupe of #22. That issue concerns the enclosing p tag. This issue involves a br tag that is inserted into an unordered list, outside, of an li tag.