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

Inheritance

Constructor

goog.format.HtmlPrettyPrinter.Buffer()

Instance Methods

Public Protected Private
lineBreak()
Append line break if we need one.
code »
pushToken(breakBeforetokenbreakAfter)
Adds token and necessary line breaks to output buffer.
Arguments:
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.
code »
toString() string
No description.
Returns: string  String representation of tokens.
code »

Instance Properties

breakCount :
Tracks number of line breaks added.
Code »
isBeginningOfNewLine_ :
Tracks if we are at the start of a new line.
Code »
needsNewLine_ :
Tracks if we need a new line before the next token.
Code »
Tokens to be output in #toString.
Code »

Package format.HtmlPrettyPrinter

Package Reference