Closed dominikwilkowski closed 5 years ago
From the example:
const pretty = require('pretty'); const STRING_OF_HTML = ` <body><img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <main> <div><img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> </div> </main><img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> </body>`; const output = pretty(STRING_OF_HTML);
Output will now be:
<body><img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <main> <div><img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> </div> </main><img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> </body>
That doesn't seem that pretty to me :( Downgrading to version 1.0.0 gives me at least:
1.0.0
<body> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <main> <div> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> </div> </main> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> <img src="http://via.placeholder.com/700x100?text=partial" /> </body>
create an issue on js-beautify
From the example:
Output will now be:
That doesn't seem that pretty to me :( Downgrading to version
1.0.0
gives me at least: