Reference
ANSIColoredPrinters.PlainTextPrinter — TypePlainTextPrinter(buf::IO)Creates a printer for MIME"text/plain" output.
Arguments
buf: A sourceIOobject containing a text with ANSI escape codes.
ANSIColoredPrinters.HTMLPrinter — TypeHTMLPrinter(buf::IO; root_class="", root_tag="pre", callback=nothing)Creates a printer for MIME"text/html" output.
Arguments
buf: A sourceIOobject containing a text with ANSI escape codes.root_class: Theclassattribute value for the root element.root_tag: The tag name for the root element.callback: A callback method (see below).
Callback method
callback(io::IO, printer::HTMLPrinter, tag::String, attrs::Dict{Symbol, String})The callback method will be called just before writing HTML tags.
Callback arguments
io: The destinationIOobject.printer: TheHTMLPrinterin use.tag: The HTML tag to be written. For closing tags, they have the prefix "/".attrs: A dictionary consisting of pairs of aSymbolfor the attributes (e.g.:class,:style) and theStringfor its value.
Callback return value
If the return value is nothing, the printer writes the HTML tag to the io according to the tag and the attrs after the call. If the return value is not nothing, this default writing will be prevented.