git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: don't allow blockquotes within lists
87e10acAlexander Krotov
src/Text/Pandoc/Readers/Muse.hs+2−1
@@ -315,7 +315,8 @@ commentTag = parseHtmlContent "comment" anyChar >> return mempty
315para :: PandocMonad m => MuseParser m (F Blocks)
315para :: PandocMonad m => MuseParser m (F Blocks)
316para = do
316para = do
317 indent <- length <$> many spaceChar
317 indent <- length <$> many spaceChar
318+ st <- stateParserContext <$> getState
318− let f = if indent >= 2 && indent < 6 then B.blockQuote else id
319+ let f = if st /= ListItemState && indent >= 2 && indent < 6 then B.blockQuote else id
319 fmap (f . B.para) . normalizeInlinesF . mconcat <$> many1Till inline endOfParaElement
320 fmap (f . B.para) . normalizeInlinesF . mconcat <$> many1Till inline endOfParaElement
320 where
321 where
321 endOfParaElement = lookAhead $ endOfInput <|> endOfPara <|> newBlockElement
322 endOfParaElement = lookAhead $ endOfInput <|> endOfPara <|> newBlockElement