max-mapper / max-mapper/commonjs-html-prettyprinter
html.prettyPrint does not do any indenting or line-breaking (Node 6.1.0)
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 76
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
System specs:
- Node: 6.1.0
- OSX: 10.11.5
I haven't had any luck with this:
var html = require('html');
var txt = '<h2><strong><a href="http://awesome.com">AwesomeCom</a></strong><span>is awesome</span></h2>';
html.prettyPrint(txt, {indent_size: 2});
// result
'<h2><strong><a href="http://awesome.com">AwesomeCom</a></strong><span>is awesome</span></h2>'
So I tried the command-line example in the README but got the same, unformatted text.
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 by reproducing the Node 6.1.0 example from the issue and the command-line example in the README, then trace the html.prettyPrint entry point. Compare both results with the expected indented and line-broken output for the sample HTML; done means the API and CLI no longer return the original unformatted string.
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
- 35/100