summaryrefslogtreecommitdiffstats
path: root/Doc/tools/sphinxext/pyspecific.py
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tools/sphinxext/pyspecific.py')
-rw-r--r--Doc/tools/sphinxext/pyspecific.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/tools/sphinxext/pyspecific.py b/Doc/tools/sphinxext/pyspecific.py
index 66a0afc..be0da34 100644
--- a/Doc/tools/sphinxext/pyspecific.py
+++ b/Doc/tools/sphinxext/pyspecific.py
@@ -13,6 +13,14 @@ ISSUE_URI = 'http://bugs.python.org/issue%s'
from docutils import nodes, utils
+# monkey-patch reST parser to disable alphabetic and roman enumerated lists
+from docutils.parsers.rst.states import Body
+Body.enum.converters['loweralpha'] = \
+ Body.enum.converters['upperalpha'] = \
+ Body.enum.converters['lowerroman'] = \
+ Body.enum.converters['upperroman'] = lambda x: None
+
+
def issue_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
issue = utils.unescape(text)
text = 'issue ' + issue