reST: indented field lists marked as definition lists (w/ fix)

Issue #905 resolved
Eric Knibbe created an issue

If a field list is indented and follows a blank line, the RstLexer treats the blank line plus the first field as a definition term, and the second field as the definition text. This happens because the definition term regex only specifies that the first character not be a space, when it should be checking for any whitespace character. See the example code on this section of the Sphinx docs for an example of this occurring.

The fix is to replace this:

(r'^([^ ].*(?<!::)\n)((?:(?: +.*)\n)+)',


(r'^([^\s].*(?<!::)\n)((?:(?: +.*)\n)+)',

Comments (2)

  1. Log in to comment