Skip to content

3.2.1

Latest

Choose a tag to compare

@nahkampf nahkampf released this 18 Oct 10:40
9a31ca9

Parser compability mode

SGR color codes comes in two variants, a modern one ("aixterm") and an oldschool one. This allows for initializing the parser in either mode (default AIXTERM).

Using the ANSIBBS compatible mode we only use 8 foreground colors and set the high intensity bit for brighter colors.

Eg:

$parser = new Parser($ansi, Parser::MODE_ANSIBBS);
$parser->parse("%f14%I'm yellow, not brown');

The above will output \e[1;33m instead of \e[93m.