summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/build.py b/build.py
index 51b2146..5e4019c 100755
--- a/build.py
+++ b/build.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python3
import glob
+import html
import json
import os
+import re
import shutil
-import html
import toml
@@ -85,8 +86,9 @@ def write_features(f, feature_data):
if url:
f.write(f' href="{url}"')
f.write('>')
- # TODO: convert `..` into <code>..</code>
- f.write(html.escape(data['title']))
+ title = html.escape(data['title'])
+ title = re.sub('`(.+?)`', lambda m: '<code>{}</code>'.format(m.group(1)), title)
+ f.write(title)
f.write('</a></li>')
f.write('</ul>')