aboutsummaryrefslogtreecommitdiff
path: root/mammoth
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-02-08 20:13:54 +0000
committerMichael Williamson <mike@zwobble.org>2015-02-08 20:13:54 +0000
commitb427b0b04c3997c9be076ca04f0fc99353d9cbc2 (patch)
treea60ab6faccf9fac65975fd0d1ad6bb8be2886eac /mammoth
parent97cec25aa615353495292aee7bfb0002c6f849db (diff)
Support br writing in markdown writer
Diffstat (limited to 'mammoth')
-rw-r--r--mammoth/writers/markdown.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mammoth/writers/markdown.py b/mammoth/writers/markdown.py
index 3449990..d97c1b9 100644
--- a/mammoth/writers/markdown.py
+++ b/mammoth/writers/markdown.py
@@ -16,6 +16,7 @@ class _Wrapped(object):
def _init_writers():
writers = {
"p": _Wrapped("", "\n\n"),
+ "br": _Wrapped("", " \n"),
}
for level in range(1, 7):
@@ -46,7 +47,8 @@ class MarkdownWriter(object):
self._fragments.append(end)
def self_closing(self, name, attributes=None):
- pass
+ self.start(name, attributes)
+ self.end(name)
def append(self, other):
self._fragments.append(other)