diff --git a/docs/reference/to_html.py b/docs/reference/to_html.py
index ce54218..39de3c7 100644
--- a/docs/reference/to_html.py
+++ b/docs/reference/to_html.py
@@ -32,13 +32,13 @@ def symbols_of(expression):
return
used_in = {
- name: sorted(set(symbols_of(joy.text_to_expression(definitions[name]))))
- for name in definitions
+ name: sorted(set(symbols_of(joy.text_to_expression(def_str))))
+ for name, def_str in definitions.items()
}
used_by = defaultdict(list)
-for name in used_in:
- for term in used_in[name]:
+for name, syms in used_in.items():
+ for term in syms:
used_by[term].append(name)
for el in used_by.values():
el.sort()
@@ -71,9 +71,13 @@ gt lt ge le neq eq
<< >>
lshift rshift'''.split())
+
+# Split the file into chunks at the Horizontal Rules.
k = re.split('^-+$', md, flags=re.MULTILINE)
#k = md.split('------------------------------------------------------------------------\n')
+
del k[0]
+
k = [section.splitlines() for section in k]
##s = set(range(len(k)))
@@ -104,7 +108,7 @@ for section in k:
combinators = set(
name
- for (name, section) in sections.items()
+ for name, section in sections.items()
if 'Combinator' in section
)
for name in combinators:
diff --git a/docs/source/Thun.md b/docs/source/Thun.md
index 4b3f004..d5fec57 100644
--- a/docs/source/Thun.md
+++ b/docs/source/Thun.md
@@ -1,6 +1,6 @@
# Thun Specification
-Version 0.5.0
+[Thun Version 0.5.0](https://ariadne.systems/pub/~sforman/Thun/)
## Grammar