[FIX] rendering of tables with merged cells
Merged cells in the first columns were not rendered correctly and values from other columns would be placed in the wrong columns.
This commit is contained in:
parent
1081f8b7b5
commit
a60364a5e4
@ -433,7 +433,12 @@ class BootstrapTranslator(nodes.NodeVisitor, object):
|
||||
tagname = 'th'
|
||||
else:
|
||||
tagname = 'td'
|
||||
self.body.append(self.starttag(node, tagname))
|
||||
attrs = {}
|
||||
if 'morerows' in node:
|
||||
attrs['rowspan'] = node['morerows']+1
|
||||
if 'morecols' in node:
|
||||
attrs['colspan'] = node['morecols']+1
|
||||
self.body.append(self.starttag(node, tagname, **attrs))
|
||||
self.context.append(tagname)
|
||||
def depart_entry(self, node):
|
||||
self.body.append(u'</{}>'.format(self.context.pop()))
|
||||
|
Loading…
Reference in New Issue
Block a user