Lines Matching +full:pass +full:- +full:1
2 # -*- coding: utf-8; mode: python -*-
6 flat-table
9 Implementation of the ``flat-table`` reST-directive.
14 The ``flat-table`` (:py:class:`FlatTable`) is a double-stage list similar to
15 the ``list-table`` with some additional features:
17 * *column-span*: with the role ``cspan`` a cell can be extended through
20 * *row-span*: with the role ``rspan`` a cell can be extended through
24 right side of that table-row. With Option ``:fill-cells:`` this behavior
30 * header-rows: [int] count of header rows
31 * stub-columns: [int] count of stub columns
33 * fill-cells: instead of autospann missing cells, insert missing cells
60 app.add_directive("flat-table", FlatTable)
94 class rowSpan(nodes.General, nodes.Element): pass # pylint: disable=C0103,C0321
95 class colSpan(nodes.General, nodes.Element): pass # pylint: disable=C0103,C0321
102 u"""FlatTable (``flat-table``) directive"""
107 , 'header-rows': directives.nonnegative_int
108 , 'stub-columns': directives.nonnegative_int
110 , 'fill-cells' : directives.flag }
128 # SDK.CONSOLE() # print --> tableNode.asdom().toprettyxml()
138 u"""Builds a table from a double-stage list"""
152 colwidths = colwidths[1]
153 stub_columns = self.directive.options.get('stub-columns', 0)
154 header_rows = self.directive.options.get('header-rows', 0)
164 # absence of rowspan (observed by the html builder, the docutils-xml
166 # no table directive (except *this* flat-table) which allows to
167 # define coexistent of rowspan and stubs (there was no use-case
168 # before flat-table). This should be reviewed (later).
170 colspec.attributes['stub'] = 1
171 stub_columns -= 1
173 stub_columns = self.directive.options.get('stub-columns', 0)
217 if len(node) != 1 or not isinstance(node[0], nodes.bullet_list):
237 * Autospan or fill (option ``fill-cells``) missing cells on the right
238 side of the table-row
248 x += 1
254 self.rows[y].insert(x+c+1, None)
257 pass # SDK.CONSOLE()
260 for c in range(cspan + 1):
262 self.rows[y+r+1].insert(x+c, None)
265 pass # SDK.CONSOLE()
266 x += 1
267 y += 1
270 # re-calculate the max columns.
279 if 'fill-cells' in self.directive.options:
283 x = self.max_cols - len(row)
285 if row[-1] is None:
286 row.append( ( x - 1, 0, []) )
288 cspan, rspan, content = row[-1]
289 row[-1] = (cspan + x, rspan, content)
308 % (col[0], col[1], content))
310 retVal = retVal[:-2]
312 retVal = retVal[:-2]
325 pass
329 childNo += 1
335 if childNo != 1 or error:
338 'two-level bullet list expected, but row %s does not '
339 'contain a second-level bullet list.'
340 % (self.directive.name, rowNum + 1))