summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-08-13 19:47:42 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-08-13 19:47:42 -0700
commit52a9ccce4f69b519ed0e80f56515c595f5d5b817 (patch)
treeb0896ee37b74ec9b75da43d2871f527e91fd2e05
parentc8fa545ee470e42e1d170b3bf88d8e23b1186039 (diff)
parent689790560271068a9f7b427869260b8ee8e6989e (diff)
Merge pull request #1531 from jkr/morefonts
Docx reader: Interpret "Strong" and "Emphasis" run styles.
-rw-r--r--src/Text/Pandoc/Readers/Docx.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs
index dcc2122bd..7697c29fa 100644
--- a/src/Text/Pandoc/Readers/Docx.hs
+++ b/src/Text/Pandoc/Readers/Docx.hs
@@ -214,10 +214,14 @@ runStyleToContainers rPr =
resolveFmt bool Nothing = bool
formatters = map Container $ mapMaybe id
- [ if resolveFmt (rStyle rPr == Just "Bold") (isBold rPr)
+ [ if resolveFmt
+ (rStyle rPr `elem` [Just "Strong", Just "Bold"])
+ (isBold rPr)
then (Just Strong)
else Nothing
- , if resolveFmt (rStyle rPr == Just "Italic") (isItalic rPr)
+ , if resolveFmt
+ (rStyle rPr `elem` [Just"Emphasis", Just "Italic"])
+ (isItalic rPr)
then (Just Emph)
else Nothing
, if resolveFmt False (isSmallCaps rPr)