aboutsummaryrefslogtreecommitdiff
path: root/mammoth/html_generation.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-07-06 17:32:51 +0100
committerMichael Williamson <mike@zwobble.org>2014-07-06 17:32:51 +0100
commit4f5020499cd5212e214698e14d014c9289b7c72c (patch)
treefe00a4831b6cea63de1bfa0749724b9c4789eeb5 /mammoth/html_generation.py
parent6c0c5a0aea77387ea4873bee27e8df88f867002b (diff)
Preserve empty cells in tables
Diffstat (limited to 'mammoth/html_generation.py')
-rw-r--r--mammoth/html_generation.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mammoth/html_generation.py b/mammoth/html_generation.py
index 8395a3d..32a0d62 100644
--- a/mammoth/html_generation.py
+++ b/mammoth/html_generation.py
@@ -12,8 +12,11 @@ class HtmlGenerator(object):
self._write_all()
self._fragments.append(_escape_html(text))
- def start(self, name, attributes=None):
+ def start(self, name, attributes=None, always_write=False):
self._stack.append(_Element(name, attributes))
+
+ if always_write:
+ self._write_all()
def end(self):
element = self._stack.pop()