diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-14 15:00:18 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-14 15:00:18 +0000 |
| commit | f5af218e186ff49e0c277f75668c1256be9cd861 (patch) | |
| tree | 59b7fedea9f58e358b7b461879666a1725cda17c /mammoth | |
| parent | 03a2f822c28a8449444af8037cb4665a48a5ad1f (diff) | |
Add self-closing tags
Diffstat (limited to 'mammoth')
| -rw-r--r-- | mammoth/html_generation.py | 3 |
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: |
