git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: allow definition to end with EOF
commit137c7c2a657492c4652d1ebcaceea44ff69f262b authorAlexander Krotov <ilabdsf@gmail.com> dateFri 24 Nov 2017, 13:16 (9 years ago) parentfe74436
2 files changed+3−1
src/Text/Pandoc/Readers/Muse.hs+1−1 test/Tests/Readers/Muse.hs+2
src/Text/Pandoc/Readers/Muse.hs+1−1
@@ -445,7 +445,7 @@ definitionListItem = try $ do
445445 term <- termParser
446446 many1 spaceChar
447447 string "::"
448− firstLine <- anyLineNewline
448+ firstLine <- many $ noneOf "\n"
449449 restLines <- manyTill anyLineNewline endOfListItemElement
450450 let lns = firstLine : restLines
451451 lineContent <- parseFromString (withListContext parseBlocks) $ concat lns ++ "\n"
test/Tests/Readers/Muse.hs+2
@@ -754,6 +754,8 @@ tests =
754754 ] =?>
755755 para "Foo" <>
756756 definitionList [ ("Bar", [ para "baz" ]) ]
757+ , "One-line definition list" =: " foo :: bar" =?>
758+ definitionList [ ("foo", [ para "bar" ]) ]
757759 , "Multi-line definition lists" =:
758760 T.unlines
759761 [ " First term :: Definition of first term"