diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-08-13 19:47:42 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-08-13 19:47:42 -0700 |
commit | 52a9ccce4f69b519ed0e80f56515c595f5d5b817 (patch) | |
tree | b0896ee37b74ec9b75da43d2871f527e91fd2e05 | |
parent | c8fa545ee470e42e1d170b3bf88d8e23b1186039 (diff) | |
parent | 689790560271068a9f7b427869260b8ee8e6989e (diff) | |
download | pandoc-52a9ccce4f69b519ed0e80f56515c595f5d5b817.tar.gz |
Merge pull request #1531 from jkr/morefonts
Docx reader: Interpret "Strong" and "Emphasis" run styles.
-rw-r--r-- | src/Text/Pandoc/Readers/Docx.hs | 8 |
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) |