diff --git a/syntaxreference.txt b/syntaxreference.txt index 5b51252..624a763 100644 --- a/syntaxreference.txt +++ b/syntaxreference.txt @@ -46,3 +46,20 @@ sixth line! * item 2, with gap * item 3 * item 3.1 += Numbered list = +{{{ + 1. item 1 + i. item 1 + i. item 2 +}}} + 1. item 1 + i. item 1 + i. item 2 +{{{ + 1. item 2 + a. item 1 + a. item 2 +}}} + 1. item 2 + a. item 1 + a. item 2 diff --git a/text_dokuwiki.py b/text_dokuwiki.py index 525e1c7..58d6ac1 100644 --- a/text_dokuwiki.py +++ b/text_dokuwiki.py @@ -26,7 +26,8 @@ class Formatter(FormatterBase): self.in_pre = 0 self._text = None # XXX does not work with links in headings!!!!! - self.bullet_depth = 0 + self.list_depth = 0 + self.list_type = None def _escape(self, text, extra_mapping={"'": "'", '"': """}): return saxutils.escape(text, extra_mapping) @@ -103,22 +104,26 @@ class Formatter(FormatterBase): return ['**', '**'][not on] def number_list(self, on, type=None, start=None, **kw): - result = '' - if self.in_p: - result = self.paragraph(0) - return result + ['