max-mapper / max-mapper/commonjs-html-prettyprinter
Meaningful textarea whitespace removed
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 76
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
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>.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided prettyPrint('<textarea> hello </textarea>') example and trace how textarea content whitespace is handled. Add regression coverage showing that the meaningful spaces remain intact; done when prettyPrint no longer changes the whitespace inside textarea content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100