@@ -87,8 +87,10 @@ parseOrg = do
87-- | Drop COMMENT headers and the document tree below those headers.
87-- | Drop COMMENT headers and the document tree below those headers.
88dropCommentTrees :: [Block] -> [Block]
88dropCommentTrees :: [Block] -> [Block]
89dropCommentTrees [] = []
89dropCommentTrees [] = []
90−dropCommentTrees blks@(b:bs) =
90+dropCommentTrees (b:bs) =
91+ maybe (b:dropCommentTrees bs)
91− maybe blks (flip dropUntilHeaderAboveLevel bs) $ commentHeaderLevel b
92+ (dropCommentTrees . flip dropUntilHeaderAboveLevel bs)
93+ (commentHeaderLevel b)
93-- | Return the level of a header starting a comment or :noexport: tree and
95-- | Return the level of a header starting a comment or :noexport: tree and
94-- Nothing otherwise.
96-- Nothing otherwise.