summaryrefslogtreecommitdiff
path: root/makespec.py
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-04 13:25:49 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-04 13:25:49 -0800
commit6d239e74bc5d61cfdaaab195adde2558afa32301 (patch)
tree732ec3c5b95c22f5830539fec58d420723e69410 /makespec.py
parentd948cb2b921ef0384015bbd432d8b7a7015fee11 (diff)
Improved spec.pdf production.
Boldface definitions.
Diffstat (limited to 'makespec.py')
-rw-r--r--makespec.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/makespec.py b/makespec.py
index 4d157a5..8e73cf4 100644
--- a/makespec.py
+++ b/makespec.py
@@ -20,7 +20,10 @@ def pipe_through_prog(prog, text):
def replaceAnchor(match):
refs.append("[{0}]: #{1}".format(match.group(1), match.group(2)))
- return '<a id="{1}" href="#{1}" class="definition">{0}</a>'.format(match.group(1), match.group(2))
+ if specformat == "html":
+ return '<a id="{1}" href="#{1}" class="definition">{0}</a>'.format(match.group(1), match.group(2))
+ else:
+ return match.group(0)
stage = 0
example = 0