aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-12-28 20:37:13 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-12-28 20:37:13 -0800
commitdc13108b72ff284592d6783745221813af1611a2 (patch)
tree808ac90425cb87dd524afb4ed6f593b301d5dedc
parentd336cfbf22065d4551a1edc9ee9e2321b3e0e2f1 (diff)
makespec.py: remove need for link anchors to be on one line.
-rwxr-xr-xtools/makespec.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/makespec.py b/tools/makespec.py
index fcd7305..eb52a60 100755
--- a/tools/makespec.py
+++ b/tools/makespec.py
@@ -116,13 +116,12 @@ with open('spec.txt', 'r', encoding='utf-8') as spec:
refs.append("[{0}]: #{1}".format(section, ident))
ln = re.sub(r'# +', '# <a id="{0}"></a>'.format(ident),
ln, count=1)
- else:
- ln = re.sub(r'\[([^]]*)\]\(@([^)]*)\)', replaceAnchor, ln)
else:
ln = re.sub(r' ', '␣', ln)
mdlines.append(ln)
-mdtext = ''.join(mdlines) + '\n\n' + '\n'.join(refs) + '\n'
+mdtext = re.sub(r'\[([^]]*)\]\(@([^)]*)\)', replaceAnchor,
+ ''.join(mdlines) + '\n\n' + '\n'.join(refs) + '\n')
yaml = ''.join(yamllines)
metadata = parseYaml(yaml)