From f55d6c27993b23110365dcdce535eb3f5d1df48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 16 Sep 2012 17:00:26 +0200 Subject: [PATCH] skip paras when in list --- text_dokuwiki.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/text_dokuwiki.py b/text_dokuwiki.py index 0682ebd..1cb2853 100644 --- a/text_dokuwiki.py +++ b/text_dokuwiki.py @@ -28,7 +28,7 @@ class Formatter(FormatterBase): self._text = None # XXX does not work with links in headings!!!!! self.list_depth = 0 - self.list_type = None + self.list_type = ' ' # dokuwiki namespace spearator, ':' or '/', see 'useslash' config self.ns_sep = '/'; @@ -112,6 +112,7 @@ class Formatter(FormatterBase): self.list_type = '-' else: self.list_depth -= 1 + self.list_type = ' ' return ['', '\n'][on] @@ -121,6 +122,7 @@ class Formatter(FormatterBase): self.list_type = '*' else: self.list_depth -= 1 + self.list_type = ' ' return ['', '\n'][on] @@ -150,7 +152,7 @@ class Formatter(FormatterBase): def paragraph(self, on, **kw): FormatterBase.paragraph(self, on) - if self.in_table: + if self.in_table or self.list_depth: return '' return ['', '\n\n'][not on]