diff options
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 3 | ||||
-rw-r--r-- | test/Tests/Readers/Muse.hs | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index a23ac239c..8bef5b539 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -469,8 +469,9 @@ orderedList = try $ do definitionListItem :: PandocMonad m => MuseParser m (F (Inlines, [Blocks])) definitionListItem = try $ do - guardDisabled Ext_amuse <|> void spaceChar -- Initial space is required by Amusewiki, but not Emacs Muse many spaceChar + startPos <- getPosition + (guardDisabled Ext_amuse) <|> (guard (sourceColumn startPos /= 1)) -- Initial space is required by Amusewiki, but not Emacs Muse pos <- getPosition term <- trimInlinesF . mconcat <$> manyTill (choice inlineList) (string "::") void spaceChar <|> lookAhead eol diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 198b95fc5..6cadd45bc 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -960,6 +960,9 @@ tests = definitionList [ ("Term1", [ para "This is a first definition\nAnd it has two lines;\nno, make that three."]) , ("Term2", [ para "This is a second definition"]) ]) + , "Nested definition list" =: + " Foo :: bar :: baz" =?> + definitionList [ ("Foo", [ definitionList [ ("bar", [ para "baz" ])]])] , "Two blank lines separate definition lists" =: T.unlines [ " First :: list" |