20 from .formatters
import _DataFileFormatter
27 _split_multiline_doc =
False
36 return [first_cell] + [
HtmlCell(c)
for c
in row[1:]]
39 return row[0] ==
'Documentation'
46 cells[0] ==
'[Documentation]'
49 start = [first_cell,
HtmlCell(cells[0])]
50 if any(c.startswith(
'#')
for c
in cells):
51 return start + [
HtmlCell(c)
for c
in cells[1:]]
68 return header + [
''] * (self.
_get_column_count_get_column_count(table) - len(header))
70 def _pad(self, row, table):
74 if table
is None or len(table.header) == 1 \
83 count = max(count, len(child.as_list()) + 1)
91 _backslash_matcher = re.compile(
r'(\\+)n ?')
93 def __init__(self, content='', attributes=None, tag='td', escape=True):
102 backslash_count = len(match.group(1))
103 if backslash_count % 2 == 1:
104 return '%sn<br>\n' % match.group(1)
112 HtmlCell.__init__(self, name, {
'class':
'name'})
118 HtmlCell.__init__(self, self.
_link_from_name_link_from_name(name, type_),
119 {
'class':
'name'}, escape=
False)
129 HtmlCell.__init__(self, content, {
'class':
'colspan%d' % span,
130 'colspan':
'%d' % span})
136 HtmlCell.__init__(self, name, {
'class':
'name',
'colspan':
'%d' % span},
def html_escape(text, linkify=True)
def attribute_escape(attr)