Fixed issue #52 - added stripping of text to list

This commit is contained in:
Viktor Hozhyi
2021-09-04 12:39:30 +03:00
parent dbd9f3f3d2
commit 044615eff1

View File

@@ -314,7 +314,7 @@ class MarkdownConverter(object):
el = el.parent el = el.parent
bullets = self.options['bullets'] bullets = self.options['bullets']
bullet = bullets[depth % len(bullets)] bullet = bullets[depth % len(bullets)]
return '%s %s\n' % (bullet, text or '') return '%s %s\n' % (bullet, (text or '').strip())
def convert_p(self, el, text, convert_as_inline): def convert_p(self, el, text, convert_as_inline):
if convert_as_inline: if convert_as_inline: