Prevent Widow Words
Maizzle uses prevent-widows to help prevent widow words in your email templates.
Simply add a prevent-widows
attribute on any HTML tag, and it will replace the last space in every text node with a
.
---
title: Preventing widow words
---
{% block template %}
<div prevent-widows>
<p>Ullamco aliqua labore do proident commodo officia excepteur.</p>
<p>Reprehenderit dolore deserunt elit reprehenderit cillum nostrud do laborum et.</p>
</div>
{% endblock %}
That will output:
<div>
<p>Ullamco aliqua labore do proident commodo officia&nbsp;excepteur.</p>
<p>Reprehenderit dolore deserunt elit reprehenderit cillum nostrud do laborum&nbsp;et.</p>
</div>
Enable
prevent-widows
globally by adding it to your Layout's <body>
tag.