# Wraps plain text and HTML to 80 character lines (by default). # Output string will always end with a newline. # Uses the format: # /pattern/flags, 'substitution' # Wraps lines. /(.{1,80})(?: |$)/gm, '$1\n' # Wraps lines, matches multiple spaces as breaks. /(.{1,80})(?:(?\n]|(?:<[^>]*>)+[^<>\n]){1,80})(?: |$|(?\n]|&[^;]*;|(?:<[^>]*>)+(?:[^&<>\n]|&[^;]*;)){1,80})(?: |$|(?\n]|&[^;]*;|(?:<[^>]*>)+(?:[^&<>\n]|&[^;]*;)){1,80})(?:(?\n]|&[^;]*;|(?:<[^>]*>)+(?:[^&<>\n]|&[^;]*;)){1,80})(?:(?