You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Widow protection doesn't work correctly and doesn't handle links.
To reproduce
Create content with various word lengths at the end of paragraphs, and links with 2 words at the end of a paragraph.
Set dewidow settings to:
// enables widow handling
"set_dewidow" => true,
// establishes maximum length of a widows that will be protected
"set_max_dewidow_length" => 10,
// establishes the maximum number of words considered for dewidowing.
"set_dewidow_word_number" => 1,
// establishes maximum length of pulled text to keep widows company
"set_max_dewidow_pull" => 10,
Only a few paragraphs will be dewidowed correctly
Expected behaviour
Widow protection should be consistent and work in links too.
Screenshots
Original content:
<p>Return the bottom portion of your invoice with a cheque to:</p>
<p>Cheques should be made payable to Urban Utilities.</p>
<p>Testing dewidow thingy with a <a href="https://saslab.docker.amazee.io/services-we-offer#entry:14@1:url">short link</a></p>
Output:
<p>Return the bottom portion of your invoice with a cheque to:</p>
<p>Cheques should be made payable to Urban Utilities.</p>
<p>Testing dewidow thingy with a <a href="https://saslab.docker.amazee.io/services-we-offer">short link</a></p>
As you can see only the second paragraph is correct
The text was updated successfully, but these errors were encountered:
Describe the bug
Widow protection doesn't work correctly and doesn't handle links.
To reproduce
Create content with various word lengths at the end of paragraphs, and links with 2 words at the end of a paragraph.
Set dewidow settings to:
Only a few paragraphs will be dewidowed correctly
Expected behaviour
Widow protection should be consistent and work in links too.
Screenshots
Original content:
Output:
As you can see only the second paragraph is correct
The text was updated successfully, but these errors were encountered: