@@ -66,7 +66,8 @@ import Text.Pandoc.Readers.Docx.StyleMap
6666import Text.Pandoc.Shared hiding (Element)
6767import Text.Pandoc.Walk
6868import Text.Pandoc.Writers.Math
69−import Text.Pandoc.Writers.Shared (fixDisplayMath, metaValueToInlines)
69+import Text.Pandoc.Writers.Shared (isDisplayMath, fixDisplayMath,
70+ metaValueToInlines)
7071import Text.Printf (printf)
7172import Text.TeXMath
7273import Text.XML.Light as XML
@@ -915,9 +916,10 @@ blockToOpenXML' opts (Para lst)
915916 | null lst && not (isEnabled Ext_empty_paragraphs opts) = return []
916917 | otherwise = do
917918 isFirstPara <- gets stFirstPara
918− paraProps <- getParaProps $ case lst of
919− [Math DisplayMath _] -> True
920− _ -> False
919+ let displayMathPara = case lst of
920+ [x] -> isDisplayMath x
921+ _ -> False
922+ paraProps <- getParaProps displayMathPara
921923 bodyTextStyle <- pStyleM "Body Text"
922924 let paraProps' = case paraProps of
923925 [] | isFirstPara -> [mknode "w:pPr" []