Commits

Anonymous committed 842572c

Disable enumerated lists introduced by alphabetic or roman numerals.

Comments (0)

Files changed (5)

 * Steve Alexander
 * Jim Ahlstrom
 * Fred Allen
-* \A. Amoroso
+* A. Amoroso
 * Pehr Anderson
 * Oliver Andrich
 * Jesús Cea Avión
 * Jeremy Craven
 * Andrew Dalke
 * Ben Darnell
-* \L. Peter Deutsch
+* L. Peter Deutsch
 * Robert Donohue
 * Fred L. Drake, Jr.
 * Jeff Epler

Doc-26/documenting/rest.rst

    * It has two items, the second
      item uses two lines.
 
+   1. This is a numbered list.
+   2. It has two items too.
+
    #. This is a numbered list.
    #. It has two items too.
 
+Note that Sphinx disables the use of enumerated lists introduced by alphabetic
+or roman numerals, such as ::
+
+   A. First item
+   B. Second item
+   
+
 Nested lists are possible, but be aware that they must be separated from the
 parent list items by blank lines::
 
    .. [#] Text of the first footnote.
    .. [#] Text of the second footnote.
 
+You can also explicitly number the footnotes for better context.
+
 
 Comments
 --------
 
 Every explicit markup block which isn't a valid markup construct (like the
-footnotes above) is regared as a comment.
+footnotes above) is regarded as a comment.
 
 
 Source encoding
 documents written from them will be in that encoding as well.
 
 
-XXX: Gotchas
+Gotchas
+-------
+
+There are some problems one commonly runs into while authoring reST documents:
+
+* **Separation of inline markup:** As said above, inline markup spans must be
+  separated from the surrounding text by non-word characters, you have to use
+  an escaped space to get around that.
+
+.. XXX more?
 * Steve Alexander
 * Jim Ahlstrom
 * Fred Allen
-* \A. Amoroso
+* A. Amoroso
 * Pehr Anderson
 * Oliver Andrich
 * Jesús Cea Avión
 * Jeremy Craven
 * Andrew Dalke
 * Ben Darnell
-* \L. Peter Deutsch
+* L. Peter Deutsch
 * Robert Donohue
 * Fred L. Drake, Jr.
 * Jeff Epler

Doc-3k/documenting/rest.rst

    * It has two items, the second
      item uses two lines.
 
+   1. This is a numbered list.
+   2. It has two items too.
+
    #. This is a numbered list.
    #. It has two items too.
 
+Note that Sphinx disables the use of enumerated lists introduced by alphabetic
+or roman numerals, such as ::
+
+   A. First item
+   B. Second item
+   
+
 Nested lists are possible, but be aware that they must be separated from the
 parent list items by blank lines::
 
    .. [#] Text of the first footnote.
    .. [#] Text of the second footnote.
 
+You can also explicitly number the footnotes for better context.
+
 
 Comments
 --------
 
 Every explicit markup block which isn't a valid markup construct (like the
-footnotes above) is regared as a comment.
+footnotes above) is regarded as a comment.
 
 
 Source encoding
 documents written from them will be in that encoding as well.
 
 
-XXX: Gotchas
+Gotchas
+-------
+
+There are some problems one commonly runs into while authoring reST documents:
+
+* **Separation of inline markup:** As said above, inline markup spans must be
+  separated from the surrounding text by non-word characters, you have to use
+  an escaped space to get around that.
+
+.. XXX more?

sphinx/environment.py

 from docutils.transforms.parts import ContentsFilter
 from docutils.transforms.universal import FilterMessages
 
+# 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
+
 from . import addnodes
 from .util import get_matching_files
 from .refcounting import Refcounts
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.