4
3
More often than not when using things like CMS'es and static site generators, HTML output looks like rubbish (wrong indendation being the most annoying flaw).
Is there any solution for having rendered output in Chrome's "View Source" tidied / prettified?
In my case I'm using a static site generator. Everything looks perfect in the editor but code gets screwed when previewing in the browser.
(I know I can probably add a build task (e.g. Grunt) to handle HTML-prettifying. But in many cases, such as when using live-reload tools (I'm using Mixture.io) where you actually preview an internal version of the site, that's not an optimal solution.)
Still works in 2017 :) – Dimitry K – 2017-07-26T16:56:21.390
I haven't had to use it in a while, devtools have come a long way, css pretty-prints now, but I'm glad it still works, it's really powerful – Hashbrown – 2017-07-27T01:26:24.993
Chrome doesn't allow the extension to operate on a tab whose address starts with
view-source:
(ie. a tab created after the user selects View Page Source). – chb – 2018-01-20T17:44:58.1072Thanks! That's a great recommendation, I'll be using it. If only it was integrated within DevTools to prevent having it in a separate window and manually refreshing upon changes … :) – Henrik – 2013-11-15T09:33:38.137