commonjs-html-prettyprinter icon indicating copy to clipboard operation
commonjs-html-prettyprinter copied to clipboard

Meaningful textarea whitespace removed

Open dsingleton opened this issue 8 years ago • 1 comments

Hi!

First, thanks for the lib, it's super useful 👍

I've spotted a bug with the handling of <textarea> content whitespace, where it's removed by prettyPrint:

require('html').prettyPrint('<textarea>     hello    </textarea>')

Results in:

<textarea>hello</textarea>

The whitespace inside a <textarea> is semantic and removing it changes the meaning of the <textarea>.

dsingleton avatar Dec 09 '16 09:12 dsingleton

I made a PR for this: https://github.com/maxogden/commonjs-html-prettyprinter/pull/16

robinwhittleton avatar Jan 03 '17 16:01 robinwhittleton