diff options
author | Stuart Rackham <srackham@methods.co.nz> | 2010-08-09 17:01:52 +1200 |
---|---|---|
committer | Stuart Rackham <srackham@methods.co.nz> | 2010-08-09 17:01:52 +1200 |
commit | 2963ce23f0dfe0c77ba6b44093b873807c17a7e8 (patch) | |
tree | 73f37448fb00201cbaccee5fa6d238242de493b1 | |
parent | 7792349880d08962081f5e3692bd29968df17ea1 (diff) | |
download | asciidoc-2963ce23f0dfe0c77ba6b44093b873807c17a7e8.tar.gz |
Reverted broken "code readablility in a2x" from previous commit.
-rwxr-xr-x | a2x.py | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -287,16 +287,6 @@ def get_source_options(asciidoc_file): Limitation: options cannot contain double-quote characters. ''' PREFIX = '// a2x:' - result = [] - if os.path.isfile(asciidoc_file): - options = '' - for line in open(asciidoc_file): - mo = re.search(r'^//\s*a2x:', line) - if mo: - options += ' ' + line[mo.end():].strip() - parse_options() - return result - def parse_options(): # Parse options to result sequence. inquotes = False @@ -320,6 +310,16 @@ def get_source_options(asciidoc_file): if opt: result.append(opt) + result = [] + if os.path.isfile(asciidoc_file): + options = '' + for line in open(asciidoc_file): + mo = re.search(r'^//\s*a2x:', line) + if mo: + options += ' ' + line[mo.end():].strip() + parse_options() + return result + ##################################################################### # Application class |