From dc13108b72ff284592d6783745221813af1611a2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 28 Dec 2015 20:37:13 -0800 Subject: makespec.py: remove need for link anchors to be on one line. --- tools/makespec.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools') 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'# +', '# '.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) -- cgit v1.2.3