Do a bunch of proofreading fixes.
[ibg.git] / tools / sphinxpatch.py
diff --git a/tools/sphinxpatch.py b/tools/sphinxpatch.py
new file mode 100644 (file)
index 0000000..44013e6
--- /dev/null
@@ -0,0 +1,10 @@
+"""
+Various monkey-patches for sphinx.
+"""
+
+# Tweak Sphinx domain option regexp to add ~ for Inform options.
+import re
+import sphinx.domains.std as std
+
+std.option_desc_re = re.compile(r'((?:/|--|-|\+)?[-?@~#_a-zA-Z0-9]+)(=?\s*.*)')
+