mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user