You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
html.prettyPrint does not do any indenting or line-breaking (Node 6.1.0) #10
var html = require('html');
var txt = '<h2><strong><a href="http://awesome.com">AwesomeCom</a></strong><span>is awesome</span></h2>';
html.prettyPrint(txt, {unformatted: []});
Activity
j-gao commentedon Nov 16, 2016
+1 for the command-line example in the README not working as expected.
tosbatti commentedon Oct 12, 2017
I had the same problem and I went crazy to understand what I was doing wrong...
It works, it's just a wrong example in the readme file.
Try with this input to see it works:
robert8888 commentedon Apr 10, 2024
To format example from read.me we need to clear
unformatedarrayline:
https://github.com/max-mapper/commonjs-html-prettyprinter/blob/master/lib/html.js#L54
this will force formatting for all html tags.