aboutsummaryrefslogtreecommitdiff
path: root/mammoth/html_generation.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-14 15:00:18 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-14 15:00:18 +0000
commitf5af218e186ff49e0c277f75668c1256be9cd861 (patch)
tree59b7fedea9f58e358b7b461879666a1725cda17c /mammoth/html_generation.py
parent03a2f822c28a8449444af8037cb4665a48a5ad1f (diff)
Add self-closing tags
Diffstat (limited to 'mammoth/html_generation.py')
-rw-r--r--mammoth/html_generation.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mammoth/html_generation.py b/mammoth/html_generation.py
index bf746aa..22db85e 100644
--- a/mammoth/html_generation.py
+++ b/mammoth/html_generation.py
@@ -23,6 +23,9 @@ class HtmlGenerator(object):
while self._stack:
self.end()
+ def self_closing(self, name):
+ self._fragments.append("<{0} />".format(name))
+
def _write_all(self):
for element in self._stack:
if not element.written: