RST reader: fix spurious newlines in some attributes from directives.

This commit is contained in:
John MacFarlane
2020-07-12 14:42:41 -07:00
parent 37e68a818b
commit e3217c3862
+2 -1
View File
@@ -223,7 +223,8 @@ rawFieldListItem minIndent = try $ do
first <- anyLine
rest <- option "" $ try $ do lookAhead (count indent (char ' ') >> spaceChar)
indentedBlock
let raw = (if T.null first then "" else first <> "\n") <> rest <> "\n"
let raw = (if T.null first then "" else first <> "\n") <> rest <>
(if T.null first && T.null rest then "" else "\n")
return (name, raw)
fieldListItem :: PandocMonad m => Int -> RSTParser m (Inlines, [Blocks])