RST reader: Include line breaks in raw field list parser output.
Note: field list items can have lists, etc. as values.
This commit is contained in:
parent
e66cc6728c
commit
422bba202e
1 changed files with 3 additions and 1 deletions
|
@ -152,7 +152,9 @@ fieldListItem indent = try $ do
|
|||
first <- manyTill anyChar newline
|
||||
rest <- option "" $ try $ lookAhead (string indent >> spaceChar) >>
|
||||
indentedBlock
|
||||
return (name, intercalate " " (first:(lines rest)))
|
||||
return (name, first ++ if null rest
|
||||
then ""
|
||||
else ("\n" ++ rest))
|
||||
|
||||
fieldList :: GenParser Char ParserState Block
|
||||
fieldList = try $ do
|
||||
|
|
Loading…
Add table
Reference in a new issue