diff --git a/src/Text/Pandoc/Readers/Org/DocumentTree.hs b/src/Text/Pandoc/Readers/Org/DocumentTree.hs index ff86a533f..afa73f203 100644 --- a/src/Text/Pandoc/Readers/Org/DocumentTree.hs +++ b/src/Text/Pandoc/Readers/Org/DocumentTree.hs @@ -41,6 +41,7 @@ documentTree :: PandocMonad m -> OrgParser m (F Inlines) -> OrgParser m (F Headline) documentTree blocks inline = do + many commentLine properties <- option mempty propertiesDrawer initialBlocks <- blocks headlines <- sequence <$> manyTill (headline blocks inline 1) eof @@ -59,6 +60,9 @@ documentTree blocks inline = do , headlineContents = initialBlocks' , headlineChildren = headlines' } + where + commentLine :: Monad m => OrgParser m () + commentLine = commentLineStart <* anyLine -- | Create a tag containing the given string. toTag :: Text -> Tag