git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #1531 from jkr/morefonts

Docx reader: Interpret "Strong" and "Emphasis" run styles.

commit52a9ccce4f69b519ed0e80f56515c595f5d5b817 authorJohn MacFarlane <jgm@berkeley.edu> dateWed 13 Aug 2014, 19:47 (12 years ago) parentc8fa5456897905
1 file changed+6−2
src/Text/Pandoc/Readers/Docx.hs+6−2
src/Text/Pandoc/Readers/Docx.hs+6−2
@@ -214,10 +214,14 @@ runStyleToContainers rPr =
214214 resolveFmt bool Nothing = bool
215215
216216 formatters = map Container $ mapMaybe id
217− [ if resolveFmt (rStyle rPr == Just "Bold") (isBold rPr)
217+ [ if resolveFmt
218+ (rStyle rPr `elem` [Just "Strong", Just "Bold"])
219+ (isBold rPr)
218220 then (Just Strong)
219221 else Nothing
220− , if resolveFmt (rStyle rPr == Just "Italic") (isItalic rPr)
222+ , if resolveFmt
223+ (rStyle rPr `elem` [Just"Emphasis", Just "Italic"])
224+ (isItalic rPr)
221225 then (Just Emph)
222226 else Nothing
223227 , if resolveFmt False (isSmallCaps rPr)