Update the regex in util.split_docinfo so that it parses multi-line field bodies.

Field Lists, which are used to define docinfo, allow multi-line field bodies,
but util.split_docinfo didn't consider it.
This commit updates the regex in that function so that it parses such multi-line field bodies.
This commit is contained in:
Junpei Kawamoto
2016-12-02 23:39:12 -05:00
parent 9cea699149
commit df37a05420
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -41,3 +41,8 @@ def test_splitdocinfo():
docinfo, content = split_docinfo(source)
assert docinfo == ':author: Georg Brandl\n:title: Manual of Sphinx\n'
assert content == '\nHello world.\n'
source = ":multiline: one\n\ttwo\n\tthree\n\nHello world.\n"
docinfo, content = split_docinfo(source)
assert docinfo == ":multiline: one\n\ttwo\n\tthree\n"
assert content == '\nHello world.\n'