nystudio107 / craft-typogrify

Typogrify prettifies your web typography by preventing ugly quotes and 'widows' and more

Home Page:https://nystudio107.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comma before line break, remove remaining text

Joobs opened this issue · comments

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>
#}

This is a bug in mundschenk-at/php-typography or the used HTML parser. I'll investigate.

This has been fixed in release 6.2.0 of mundschenk-at/php-typography.