An HTML Formatter formats TextBlock objects into HTML.
def __init__(self, out):
Constructs an HTML formatted from an output stream.
Provides mandatory override of
spug.nml.StdFormatter.StdFormatter._commit(), writing the data to the
output file.
Converts '>', '<' and '&' to HTML escape sequences.
Returns a tuple of the leading and trailing tags for the given type.
Writes a list of words and subblocks.
Formats the block as its HTML equivalent.
Formats text (an NML TextBlock)
as a complete HTML document.
_commit(self, data)
def _commit(self, data):
_fix(self, val)
def _fix(self, val):
_getTags(self, type)
def _getTags(self, type):
_writeWords(self, words)
def _writeWords(self, words):
format(self, block)
def format(self, block):
formatAll(self, text)
def formatAll(self, text):