File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 2424# Used in conf.py and updated here by python/release-tools/run_release.py
2525SOURCE_URI = 'https://github.com/python/cpython/tree/main/%s'
2626
27- # monkey-patch reST parser to disable alphabetic and roman enumerated lists
27+ # monkey-patch reST parser to detect any alphabetic and roman enumerated lists
28+ # that need escaping. Sadly we don't get a location to point to.
2829from docutils .parsers .rst .states import Body
30+ def disabled_converter (x ):
31+ raise Exception ("Detected an alphabetic or Roman enumerated list. "
32+ "It needs to be escaped." )
33+
2934Body .enum .converters ['loweralpha' ] = \
3035 Body .enum .converters ['upperalpha' ] = \
3136 Body .enum .converters ['lowerroman' ] = \
32- Body .enum .converters ['upperroman' ] = lambda x : None
37+ Body .enum .converters ['upperroman' ] = disabled_converter
3338
3439
3540class PyAwaitableMixin (object ):
You can’t perform that action at this time.
0 commit comments