The goog.format.HtmlPrettyPrinter Class

goog.format.HtmlPrettyPrinter(opt_timeOutMillis)

This class formats HTML to be more human-readable. TODO(user): Add hierarchical indentation.

opt_timeOutMillis {number=}
Max # milliseconds to spend on #format. If this time is exceeded, return partially formatted. 0 or negative number indicates no timeout.

The goog.format.HtmlPrettyPrinter.Buffer Class

This class is a buffer to which we push our output. It tracks line breaks to make sure we don't add unnecessary ones. … more

.format(html)

Static utility function. See prototype #format.

html {string}
The HTML text to pretty print.
returns {string}
Formatted result.