Created
November 1, 2021 17:04
-
-
Save dleatherman/62cecf4c37a673ed92644a12437a4b13 to your computer and use it in GitHub Desktop.
This replaces last space with a non-breaking to prevent widows in text.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if content %}{% assign no_widows = content | split: '' | reverse | join: '' | replace_first: ' ', ';psbn&' | split: '' | reverse | join: '' %}{{ no_widows }}{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment