summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Rackham <srackham@methods.co.nz>2010-08-09 17:01:52 +1200
committerStuart Rackham <srackham@methods.co.nz>2010-08-09 17:01:52 +1200
commit2963ce23f0dfe0c77ba6b44093b873807c17a7e8 (patch)
tree73f37448fb00201cbaccee5fa6d238242de493b1
parent7792349880d08962081f5e3692bd29968df17ea1 (diff)
downloadasciidoc-2963ce23f0dfe0c77ba6b44093b873807c17a7e8.tar.gz
Reverted broken "code readablility in a2x" from previous commit.
-rwxr-xr-xa2x.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/a2x.py b/a2x.py
index 57065f1..c379a0e 100755
--- a/a2x.py
+++ b/a2x.py
@@ -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