Skip to Content
  • Website
Codsen
  • Home
  • Open Source
  • Articles
  • About

backOpen Source→string-remove-widows→Examples

Permalink to Table of ContentsTable of Contents

  • Quick Take
  • Encode the inserted non-breaking space for CSS
  • Ignore a custom pair of template markers
  • Keep a dash with its neighbouring words when hyphen handling is enabled
  • Ignore every built-in template syntax preset
  • Ignore Hexo template expressions while processing surrounding text
  • Ignore Hugo template expressions while processing surrounding text
  • Ignore Jinja tags while processing surrounding text
  • Ignore Liquid tags while processing surrounding text
  • Ignore Nunjucks tags while processing surrounding text
  • Encode the inserted non-breaking space for JavaScript
  • Apply widow prevention only after the minimum character count is reached
  • Apply widow prevention only after the minimum word count is reached
  • Inspect which transformations were applied
  • Map progress reports into a caller-owned percentage range
  • Insert a raw non-breaking space instead of an encoded entity
  • Remove an existing widow-prevention entity
  • Keep both halves of a UK postcode together
  • Widow word removal from text within HTML
↑ back to top

Permalink to Quick TakeQuick Take

↑ back to top

Permalink to Encode the inserted non-breaking space for CSSEncode the inserted non-breaking space for CSS

↑ back to top

Permalink to Ignore a custom pair of template markersIgnore a custom pair of template markers

↑ back to top

Permalink to Keep a dash with its neighbouring words when hyphen handling is enabledKeep a dash with its neighbouring words when hyphen handling is enabled

↑ back to top

Permalink to Ignore every built-in template syntax presetIgnore every built-in template syntax preset

↑ back to top

Permalink to Ignore Hexo template expressions while processing surrounding textIgnore Hexo template expressions while processing surrounding text

↑ back to top

Permalink to Ignore Hugo template expressions while processing surrounding textIgnore Hugo template expressions while processing surrounding text

↑ back to top

Permalink to Ignore Jinja tags while processing surrounding textIgnore Jinja tags while processing surrounding text

↑ back to top

Permalink to Ignore Liquid tags while processing surrounding textIgnore Liquid tags while processing surrounding text

↑ back to top

Permalink to Ignore Nunjucks tags while processing surrounding textIgnore Nunjucks tags while processing surrounding text

↑ back to top

Permalink to Encode the inserted non-breaking space for JavaScriptEncode the inserted non-breaking space for JavaScript

↑ back to top

Permalink to Apply widow prevention only after the minimum character count is reachedApply widow prevention only after the minimum character count is reached

↑ back to top

Permalink to Apply widow prevention only after the minimum word count is reachedApply widow prevention only after the minimum word count is reached

↑ back to top

Permalink to Inspect which transformations were appliedInspect which transformations were applied

↑ back to top

Permalink to Map progress reports into a caller-owned percentage rangeMap progress reports into a caller-owned percentage range

↑ back to top

Permalink to Insert a raw non-breaking space instead of an encoded entityInsert a raw non-breaking space instead of an encoded entity

↑ back to top

Permalink to Remove an existing widow-prevention entityRemove an existing widow-prevention entity

↑ back to top

Permalink to Keep both halves of a UK postcode togetherKeep both halves of a UK postcode together

↑ back to top

Permalink to Widow word removal from text within HTMLWidow word removal from text within HTML

↑ back to top
back 

Copyright

All rights reserved © Roy Revelt 2026
All our open source packages are under MIT licenceopens in a new tab

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab