unwrap
Joins hard-wrapped lines into paragraphs, keeping blank lines and list items.
Details #
unwrap(text) joins the lines of each paragraph with single spaces. A blank line ends a paragraph and is kept. A line that starts with a bullet (-, *, •) or a number (1., 2)) starts its own line, so lists survive. Also the unwrap op of Transform text.
Parameters #
Takes 1 argument.
{{ unwrap(text) }}
Examples #
unwrap("one\ntwo\n\n- a\n- b")→
one two
- a
- bGotchas #
A word split with a hyphen across lines is not rejoined.