framework icon indicating copy to clipboard operation
framework copied to clipboard

Cannot use prevent-widows on tags that include mso comments

Open cossssmin opened this issue 3 years ago • 0 comments

  • Maizzle version: 4.2.2
  • Node.js version: any

Something like this:

<div prevent-widows>
  <!--[if mso]>
    <div>test</div>
  <![endif]-->
  <div>test</div>
</div>

... is compiled to this:

<div>
  <!--[if mso]>
    <div>test</div>
  <![endif]-&#8209;>
  <div>test</div>
</div>
-->
</div>

This is because prevent-widows replaces - with &#8209; and it doesn't offer any way of configuring it when used with the PostHTML method that it exposes.

Maybe we can switch to string-remove-widows.

cossssmin avatar Oct 08 '22 11:10 cossssmin