aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs6
-rw-r--r--test/Tests/Readers/Muse.hs12
2 files changed, 15 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index d2f403f4b..e3c8392e6 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -256,8 +256,8 @@ parseBlocks :: PandocMonad m
parseBlocks =
try (parseEnd <|>
nextSection <|>
- blockStart <|>
listStart <|>
+ blockStart <|>
paraStart)
where
nextSection = mempty <$ lookAhead headingStart
@@ -287,7 +287,7 @@ parseBlocksTill end = continuation
blockStart = (B.<>) <$> blockElements <*> allowPara continuation
listStart = uncurry (B.<>) <$> allowPara (anyListUntil (parseEnd <|> continuation))
paraStart = uncurry (B.<>) <$> paraUntil (parseEnd <|> continuation)
- continuation = try $ parseEnd <|> blockStart <|> listStart <|> paraStart
+ continuation = try $ parseEnd <|> listStart <|> blockStart <|> paraStart
listItemContentsUntil :: PandocMonad m
=> Int
@@ -296,7 +296,7 @@ listItemContentsUntil :: PandocMonad m
-> MuseParser m (F Blocks, a)
listItemContentsUntil col pre end = p
where
- p = try blockStart <|> try listStart <|> try paraStart
+ p = try listStart <|> try blockStart <|> try paraStart
parsePre = (mempty,) <$> pre
parseEnd = (mempty,) <$> end
paraStart = do
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index e73b1abde..bb61e848f 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -1328,6 +1328,18 @@ tests =
]
])
]
+ , "Definition list with table" =:
+ " foo :: bar | baz" =?>
+ definitionList [ ("foo", [ table mempty [(AlignDefault, 0.0), (AlignDefault, 0.0)]
+ []
+ [[plain "bar", plain "baz"]]
+ ])]
+ , "Definition list with table inside bullet list" =:
+ " - foo :: bar | baz" =?>
+ bulletList [definitionList [ ("foo", [ table mempty [(AlignDefault, 0.0), (AlignDefault, 0.0)]
+ []
+ [[plain "bar", plain "baz"]]
+ ])]]
, test emacsMuse "Multi-line definition lists from Emacs Muse manual"
(T.unlines
[ "Term1 ::"