aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Reindl <[email protected]>2025-01-31 00:23:53 +0100
committerGitHub <[email protected]>2025-01-30 15:23:53 -0800
commit3c8ca600eff9db0e3f2a5740df85680cc2c8cec3 (patch)
tree30817e7f1318169308dcf6f1ce9955a1c4bd04e4 /src
parent31e36d4fd5cfb611e66a7218cb9be5ac9d5dfc10 (diff)
DOCX reader: do not issue warning for comments with `+styles` (#10572)
Closes #10571. Co-authored-by: Stephen Reindl <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Docx.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs
index 3222e81b6..cafd4cbe6 100644
--- a/src/Text/Pandoc/Readers/Docx.hs
+++ b/src/Text/Pandoc/Readers/Docx.hs
@@ -357,9 +357,10 @@ extentToAttr _ = nullAttr
blocksToInlinesWarn :: PandocMonad m => T.Text -> Blocks -> DocxContext m Inlines
blocksToInlinesWarn cmtId blks = do
let paraOrPlain :: Block -> Bool
- paraOrPlain (Para _) = True
- paraOrPlain (Plain _) = True
- paraOrPlain _ = False
+ paraOrPlain (Para _) = True
+ paraOrPlain (Plain _) = True
+ paraOrPlain (Div _ nested) = all paraOrPlain nested
+ paraOrPlain _ = False
unless (all paraOrPlain blks) $
lift $ P.report $ DocxParserWarning $
"Docx comment " <> cmtId <> " will not retain formatting"