Muse reader: allow definition to end with EOF

This commit is contained in:
Alexander Krotov
2017-11-24 13:16:09 +03:00
parent fe74436540
commit 137c7c2a65
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -445,7 +445,7 @@ definitionListItem = try $ do
term <- termParser
many1 spaceChar
string "::"
firstLine <- anyLineNewline
firstLine <- many $ noneOf "\n"
restLines <- manyTill anyLineNewline endOfListItemElement
let lns = firstLine : restLines
lineContent <- parseFromString (withListContext parseBlocks) $ concat lns ++ "\n"
+2
View File
@@ -754,6 +754,8 @@ tests =
] =?>
para "Foo" <>
definitionList [ ("Bar", [ para "baz" ]) ]
, "One-line definition list" =: " foo :: bar" =?>
definitionList [ ("foo", [ para "bar" ]) ]
, "Multi-line definition lists" =:
T.unlines
[ " First term :: Definition of first term"