linewrap
linewrap copied to clipboard
Word wrapping with HTML, ANSI color code, indentation and paragraphing support
See the individual commits; the patch for #1 can be easily separated out. The other useful stuff in here: - tests ported to mocha+chai - npm script commands updated (ESlint...
- paragraph tests pass. - The fix for #1 is simply allowing arbitrary line breaks in the input, but outputting the requested type (Windows, Unix, Mac). Garbage in, Sanity out.
paragraph unit tests fail. Diagnosis: feeding linewrap input with Windows CRLF line breaks outputs fragmented text on Windows: the \r CR characters are not recognized.