Allow generating plain (colored) text from html//1 compatible calls. We do this in two steps, first creating a token list and next deal with state using fixup_layout/2. It would be nicer if we could avoid the latter step, but we need to maintain state such as indentation and attributes and we cannot pass that around in an additional argument as there are calls that do not know about this transformation in between.
The translation is highly specific for the calls done in html.pl. If you change CSS classes or the HTML DOM produced you likely have to make changes here as well.
plain
or html
nl(N)
and indent(Incr)
tokens, computing the
next relevant indentation and the number of newlines to insert.The following predicates are exported, but not or incorrectly documented.