aboutsummaryrefslogtreecommitdiff
path: root/mammoth/html_generation.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-05-17 16:32:49 +0100
committerMichael Williamson <mike@zwobble.org>2015-05-17 16:32:49 +0100
commit74c9f604aa9118ef3693a00714baa4e3f24e21d5 (patch)
treec6471590ad62211932bab38e86618b253570f3c3 /mammoth/html_generation.py
parentd24a8455550fe959e0c2941a917eb1593c191d46 (diff)
Add ignore_empty_paragraphs option
Diffstat (limited to 'mammoth/html_generation.py')
-rw-r--r--mammoth/html_generation.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mammoth/html_generation.py b/mammoth/html_generation.py
index a0c35b7..c7f4f38 100644
--- a/mammoth/html_generation.py
+++ b/mammoth/html_generation.py
@@ -9,14 +9,14 @@ class HtmlGenerator(object):
def text(self, text):
if text:
- self._write_all()
+ self.write_all()
self._writer.text(text)
def start(self, name, attributes=None, always_write=False):
self._stack.append(_Element(name, attributes))
if always_write:
- self._write_all()
+ self.write_all()
def end(self):
element = self._stack.pop()
@@ -30,7 +30,7 @@ class HtmlGenerator(object):
def self_closing(self, name, attributes=None):
self._writer.self_closing(name, attributes)
- def _write_all(self):
+ def write_all(self):
for element in self._stack:
if not element.written:
element.written = True
@@ -42,7 +42,7 @@ class HtmlGenerator(object):
def append(self, other):
other_string = other.as_string()
if other_string:
- self._write_all()
+ self.write_all()
self._writer.append(other_string)
def as_string(self):