The goog.format.HtmlPrettyPrinter.Buffer Class

goog.format.HtmlPrettyPrinter.Buffer()

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

.breakCount {number}

Tracks number of line breaks added.

.lineBreak()

Append line break if we need one.

.pushToken(breakBefore, token, breakAfter)

Adds token and necessary line breaks to output buffer.

breakBefore {boolean}
If true, add line break before token if necessary.
token {string}
Token to push.
breakAfter {boolean}
If true, add line break after token if necessary.

.toString()

returns {string}
String representation of tokens.