Comma before line break, remove remaining text
Joobs opened this issue · comments
T Juby commented
I was trying to output an address an noticed that if a comma was before a line break tag then Typogrify would not display any text after the comma, but it does still includes any html.
{# FAIL: comma before line breaks #}
{% set text = '<p>Line One,<br>Line Two,<br><span>Line Three.</span></p>' %}
{# WORKS #}
{% set text2 = '<p>Line One<br>Line Two<br><span>Line Three.</span></p>' %}
{{ text|typogrify }}
{#
<p>Line One,<br><br><span></span></p>
#}
{{ text2|typogrify }}
{#
<p>Line One<br>Line Two<br><span>Line Three.</span></p>
#}
Der Mundschenk & Compagnie commented
This is a bug in mundschenk-at/php-typography or the used HTML parser. I'll investigate.
Der Mundschenk & Compagnie commented
This has been fixed in release 6.2.0 of mundschenk-at/php-typography
.
Andrew Welch commented
Thanks @mundschenk-at