X-Git-Url: https://jxself.org/git/?p=ibg.git;a=blobdiff_plain;f=tools%2Fsphinxpatch.py;fp=tools%2Fsphinxpatch.py;h=44013e67d329daaa13e8d85ca8396fba5d1ceea5;hp=0000000000000000000000000000000000000000;hb=2a223f38ada318aa468e46210b7f92941816100e;hpb=f0b3c1de40eb2b2f228e43e99bf0535b1c2ea5da diff --git a/tools/sphinxpatch.py b/tools/sphinxpatch.py new file mode 100644 index 0000000..44013e6 --- /dev/null +++ b/tools/sphinxpatch.py @@ -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*.*)') +