OMath parser: don't group expressions if there's only one.
commitcf849443cba46952ec8b3c5c59b70cadc040ef3f
authorJesse Rosenthal <jrosenthal@jhu.edu>
dateThu 7 Aug 2014, 22:55 (12 years ago)
parent40602c3
src/Text/Pandoc/Readers/Docx/OMath.hs+3−3
@@ -607,10 +607,10 @@ oMathRunStyleToTextType mrPr
607607 Just $ TM.TextBoldItalic
608608 | otherwise = Nothing
609609
610−
611−
612610baseToExp :: Base -> TM.Exp
613−baseToExp b = TM.EGrouped $ baseToExp' b
611+baseToExp b = case baseToExp' b of
612+ (e : []) -> e
613+ exps -> TM.EGrouped exps
614614
615615-- an ungrouped version of baseToExp
616616baseToExp' :: Base -> [TM.Exp]