aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-09-10 09:50:05 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-09-10 09:50:05 -0700
commit0216a2f5047dd78ecc3c26659281a8b629a83de0 (patch)
treea6f6566678761d0d528094880586516e0502dab1 /src/Text
parent12b3ee3787043f4c072c338762a5928c84ce5b5f (diff)
downloadpandoc-0216a2f5047dd78ecc3c26659281a8b629a83de0.tar.gz
Org reader: don't parse a list as first item in a list item.
Closes #7557.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs
index f18d2f9a7..2ec97d903 100644
--- a/src/Text/Pandoc/Readers/Org/Blocks.hs
+++ b/src/Text/Pandoc/Readers/Org/Blocks.hs
@@ -889,7 +889,10 @@ listItem parseIndentedMarker = try . withContext ListItemState $ do
firstLine <- anyLineNewline
blank <- option "" ("\n" <$ blankline)
rest <- T.concat <$> many (listContinuation markerLength)
- contents <- parseFromString blocks $ firstLine <> blank <> rest
+ contents <- parseFromString (do initial <- paraOrPlain <|> pure mempty
+ subsequent <- blocks
+ return $ initial <> subsequent)
+ (firstLine <> blank <> rest)
return (maybe id (prependInlines . checkboxToInlines) box <$> contents)
-- | Prepend inlines to blocks, adding them to the first paragraph or