mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 01:36:45 +00:00
Muse reader: allow definition to end with EOF
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user