aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-10-28 03:52:25 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-10-28 03:52:25 +0300
commite34a0703f557ed4ceeadaa6cb29edb6239255d96 (patch)
tree063866e6a3ec2e7bb9ade7157526e311454d4376 /src
parentd8135b2e67aec4061386fb91da9c4a080d54e7fb (diff)
downloadpandoc-e34a0703f557ed4ceeadaa6cb29edb6239255d96.tar.gz
Muse reader: try to parse lists before trying to parse table
This ensures that tables inside lists are parsed correctly.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs6
1 files changed, 3 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