Inspired by a Twitter request this morning, I’ve updated the Markdown Service Tools to version 1.3.1 to include an experimental version of a new service: Unwrap Paragraphs.
Opposite from the “Preserve line breaks” service, this one will look for consecutive lines and merge them together into one paragraph. It handles hyphenated words and won’t mess up em/en dashes in Markdown style (--
or ---
). If there’s a newline between two lines, it assumes it’s a new paragraph and treats it as such.
Note: this does currently unwrap list items and code blocks as well. It should be used selectively on paragraph text. I’ll eventually put in the time to come up with a regular expression that will avoid this.
Version 1.3.1 is available on the Markdown Service Tools project page. Somebody owes me a box of Aussie Tim Tams.