git.iko.soy/typeable/pandoc
on master help sign in
Docx reader: Fix bug in character styles.

Style handling has been cleaned up, but introduced a bug here. There wasn't previously a test to catch it.

commit9969b2ebee7a9e8d586ef0a369bc6c549c7a8df6 authorJesse Rosenthal <jrosenthal@jhu.edu> dateSat 16 Aug 2014, 14:05 (12 years ago) parent0ff9ec2
1 file changed+2−2
src/Text/Pandoc/Readers/Docx.hs+2−2
src/Text/Pandoc/Readers/Docx.hs+2−2
@@ -242,14 +242,14 @@ runStyleToTransform rPr
242242 , s `elem` emphStyles =
243243 let rPr' = rPr{rStyle = Nothing, isItalic = Nothing}
244244 in
245− case isItalic rPr' of
245+ case isItalic rPr of
246246 Just False -> runStyleToTransform rPr'
247247 _ -> emph . (runStyleToTransform rPr')
248248 | Just s <- rStyle rPr
249249 , s `elem` strongStyles =
250250 let rPr' = rPr{rStyle = Nothing, isBold = Nothing}
251251 in
252− case isItalic rPr' of
252+ case isBold rPr of
253253 Just False -> runStyleToTransform rPr'
254254 _ -> strong . (runStyleToTransform rPr')
255255 | Just True <- isItalic rPr =