diff options
author | Stuart Rackham <srackham@methods.co.nz> | 2009-01-02 13:28:13 +1300 |
---|---|---|
committer | Stuart Rackham <srackham@methods.co.nz> | 2009-01-02 13:28:13 +1300 |
commit | 9709fb1dce0353d066577f931894d333e9c7b5c9 (patch) | |
tree | 019405ee52790efee1250d88eee5be5341b59bb3 /asciidoc.py | |
parent | fb66fe1eb21dc112f6d6fe69b32506986d5a1cde (diff) | |
download | asciidoc-py3-9709fb1dce0353d066577f931894d333e9c7b5c9.tar.gz |
- Bumped version number.8.3.3
- Attribute lists can now preceed nested lists.
Diffstat (limited to 'asciidoc.py')
-rwxr-xr-x | asciidoc.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/asciidoc.py b/asciidoc.py index ae0b7b0..70901ec 100755 --- a/asciidoc.py +++ b/asciidoc.py @@ -8,7 +8,7 @@ under the terms of the GNU General Public License (GPL). import sys, os, re, time, traceback, tempfile, subprocess, codecs, locale -VERSION = '8.3.2' # See CHANGLOG file for version history. +VERSION = '8.3.3' # See CHANGLOG file for version history. #--------------------------------------------------------------------------- # Program onstants. @@ -2198,9 +2198,6 @@ class List(AbstractBlock): def iscontinued(self): if reader.read_next() == '+': reader.read() # Discard. - # Allow attribute list to precede continued list item element. - while Lex.next() is AttributeList: - Lex.next().translate() return True else: return False @@ -2229,6 +2226,7 @@ class List(AbstractBlock): lists.delimiter + r'|^\+$|^$|' + blocks.delimiter + r'|' + tables.delimiter + r'|' + tables_OLD.delimiter + + r'|' + AttributeList.pattern ) if self.text is not None: text = [self.text] + list(text) @@ -2236,6 +2234,9 @@ class List(AbstractBlock): writer.write_tag(self.tag.text, text, self.presubs, self.attributes) continued = self.iscontinued() while True: + # Allow attribute list to precede continued list item element. + while Lex.next() is AttributeList: + Lex.next().translate() next = Lex.next() if next in lists.open: break @@ -2263,11 +2264,16 @@ class List(AbstractBlock): lists.delimiter + r'|^$|' + blocks.delimiter + r'|' + tables.delimiter + r'|' + tables_OLD.delimiter + + r'|' + AttributeList.pattern ) if self.text is not None: text = [self.text] + list(text) - writer.write_tag(self.tag.text, text, self.presubs, self.attributes) + if text: + writer.write_tag(self.tag.text, text, self.presubs, self.attributes) while True: + # Allow attribute list to precede continued list item element. + while Lex.next() is AttributeList: + Lex.next().translate() next = Lex.next() if next in lists.open: break |