git.iko.soy/typeable/pandoc
on master help sign in
Docx reader: Interpret "Strong" and Emphasis run styles.
commit689790560271068a9f7b427869260b8ee8e6989e authorJesse Rosenthal <jrosenthal@jhu.edu> dateWed 13 Aug 2014, 12:23 (12 years ago) parent1d6e1cf
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)