aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Docx/OMath.hs
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2014-08-07 22:55:03 -0400
committerJesse Rosenthal <jrosenthal@jhu.edu>2014-08-08 14:12:05 -0400
commitcf849443cba46952ec8b3c5c59b70cadc040ef3f (patch)
tree5e36986143572025fcee8ff652acd4450ded6acd /src/Text/Pandoc/Readers/Docx/OMath.hs
parent40602c3df69c23c9bc5c42b2de423965cdc2a103 (diff)
downloadpandoc-cf849443cba46952ec8b3c5c59b70cadc040ef3f.tar.gz
OMath parser: don't group expressions if there's only one.
Diffstat (limited to 'src/Text/Pandoc/Readers/Docx/OMath.hs')
-rw-r--r--src/Text/Pandoc/Readers/Docx/OMath.hs6
1 files changed, 3 insertions, 3 deletions
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]