Can I use chrome devtools html formatter standalone?

24 Views Asked by At

Is there a way to use the chrome devtools html formatter standalone?

I want to compare 2 html string for differences but ignoring non-significant white-space

I have some html string that I would like to format as in the devtools source pane? I've tried other formatters like using php DomDocument with preserveWhitespace = false but I still doesn't like the generated output

Or is there a way (using puppeteer or some kind of browser automation) to open a page in chrome, open the devtools, go the the sources pane, select the correct page, click the prettify icon and save the prettified text?

0

There are 0 best solutions below