diff options
-rw-r--r-- | src/Text/Pandoc/Readers/Docx.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs index cd4ff01db..80fd6285c 100644 --- a/src/Text/Pandoc/Readers/Docx.hs +++ b/src/Text/Pandoc/Readers/Docx.hs @@ -342,11 +342,11 @@ extentToAttr _ = nullAttr blocksToInlinesWarn :: PandocMonad m => T.Text -> Blocks -> DocxContext m Inlines blocksToInlinesWarn cmtId blks = do let blkList = toList blks - notParaOrPlain :: Block -> Bool - notParaOrPlain (Para _) = False - notParaOrPlain (Plain _) = False - notParaOrPlain _ = True - unless ( not (any notParaOrPlain blkList)) $ + paraOrPlain :: Block -> Bool + paraOrPlain (Para _) = True + paraOrPlain (Plain _) = True + paraOrPlain _ = False + unless (all paraOrPlain blkList) $ lift $ P.report $ DocxParserWarning $ "Docx comment " <> cmtId <> " will not retain formatting" return $ blocksToInlines' blkList |