diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 74653efcf..1d64ff220 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -151,13 +151,12 @@ rawFieldListItem :: String -> Parser [Char] ParserState (String, String) rawFieldListItem indent = try $ do string indent char ':' - name <- many1 $ noneOf ":" - char ':' + name <- many1Till (noneOf "\n") (char ':') skipSpaces first <- manyTill anyChar newline rest <- option "" $ try $ do lookAhead (string indent >> spaceChar) indentedBlock - let raw = first ++ "\n" ++ rest ++ "\n" + let raw = (if null first then "" else (first ++ "\n")) ++ rest ++ "\n" return (name, raw) fieldListItem :: String |