Log interprets a stream of text and ANSI escape codes.
Parse and interpret a chunk of ANSI output.
Trailing partial ANSI escape codes will be prepended to the chunk in the next
call to update.
Render the model's logs as HTML.
Wraps a <pre> around the the result of calling viewLine for each line.
As a cheap optimization, each line is rendered lazily.
Render an individual line as HTML.
The line is rendered as a <div> containing <span> elements with styling and classes for each Chunk.
The span elements will have the following attributes:
style="font-weight: bold|normal"class="ansi-COLOR-fg ansi-COLOR-bg ansi-bold"...where each class is optional, and COLOR is one of:
blackredgreenyellowbluemagentacyanwhitebright-blackbright-redbright-greenbright-yellowbright-bluebright-magentabright-cyanbright-whiteIf the chunk is inverted, the -fg and -bg classes will have their colors
swapped. If the chunk is bold, the ansi-bold class will be present.
Model is populated by parsing ANSI character sequences and escape codes
via update.
lines contains all of the output that's been parsedposition is the current position of the cursorstyle is the style to be applied to any text that's printedremainder is a partial ANSI escape sequence left around from an incomplete
segment from the streamHow to interpret linebreaks.
Raw: interpret \n as just \n, i.e. move down a line, retaining the
cursor columnCooked: interpret \n as \r\n, i.e. move down a line and go to the first
columnA list of arbitrarily-sized chunks of output.
A blob of text paired with the style that was configured at the time.
The coordinate in the window where text will be printed.
Construct an empty model.