diff options
Diffstat (limited to 'doc/_themes/odoodoc/sphinx_monkeypatch.py')
| -rw-r--r-- | doc/_themes/odoodoc/sphinx_monkeypatch.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/_themes/odoodoc/sphinx_monkeypatch.py b/doc/_themes/odoodoc/sphinx_monkeypatch.py index 182fef89c8d..5bce9c9a155 100644 --- a/doc/_themes/odoodoc/sphinx_monkeypatch.py +++ b/doc/_themes/odoodoc/sphinx_monkeypatch.py @@ -68,8 +68,13 @@ def visit_table(self, node): self._table_row_index = 0 self.context.append(self.compact_p) self.compact_p = True - classes = ' '.join({'table', self.settings.table_style}).strip() - self.body.append(self.starttag(node, 'table', CLASS=classes)) + + classes = {self.settings.table_style} + node_classes = node.get('classes', []) + if 'no-table' in node_classes: node_classes.remove('no-table') + else: classes.add('table') + + self.body.append(self.starttag(node, 'table', CLASS=' '.join(classes).strip())) def starttag_data(self, node, tagname, suffix='\n', empty=False, **attributes): attributes.update( |
