Format text for output as markup.
class markup formatter
extends text formatter
import ideal • machine • elements • runtime util
static OPEN START TAG : "<"
static OPEN END TAG : "</"
static ATTRIBUTE SEPARATOR : " "
static ATTRIBUTE START : "='"
static ATTRIBUTE END : "'"
static CLOSE TAG : ">"
static CLOSE SELF CLOSING TAG : " />"
static DEFAULT INDENT : " "
private boolean write newlines
overload markup formatter(output[character] out, string spaces, boolean write newlines)
super(out, spaces)
this • write newlines = write newlines
override void process element(text element element)
if children is null
else
if is block
else
process(children)
if is block
else
write end tag(element)
private void do unindent()
private void write start tag(text element element, readonly dictionary[attribute id, attribute fragment] attributes)
write tag attributes(attributes)
private void write self closing tag(text element element, readonly dictionary[attribute id, attribute fragment] attributes)
write tag attributes(attributes)
private void write tag attributes(readonly dictionary[attribute id, attribute fragment] attributes)