From cf849443cba46952ec8b3c5c59b70cadc040ef3f Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Thu, 7 Aug 2014 22:55:03 -0400 Subject: OMath parser: don't group expressions if there's only one. --- src/Text/Pandoc/Readers/Docx/OMath.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Docx/OMath.hs b/src/Text/Pandoc/Readers/Docx/OMath.hs index 309aaefe8..8dd39c613 100644 --- a/src/Text/Pandoc/Readers/Docx/OMath.hs +++ b/src/Text/Pandoc/Readers/Docx/OMath.hs @@ -607,10 +607,10 @@ oMathRunStyleToTextType mrPr Just $ TM.TextBoldItalic | otherwise = Nothing - - baseToExp :: Base -> TM.Exp -baseToExp b = TM.EGrouped $ baseToExp' b +baseToExp b = case baseToExp' b of + (e : []) -> e + exps -> TM.EGrouped exps -- an ungrouped version of baseToExp baseToExp' :: Base -> [TM.Exp] -- cgit v1.2.3