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.
This commit is contained in:
Jesse Rosenthal 2014-08-16 14:05:19 -04:00
parent 0ff9ec2f4e
commit 9969b2ebee

View file

@ -242,14 +242,14 @@ runStyleToTransform rPr
, s `elem` emphStyles = , s `elem` emphStyles =
let rPr' = rPr{rStyle = Nothing, isItalic = Nothing} let rPr' = rPr{rStyle = Nothing, isItalic = Nothing}
in in
case isItalic rPr' of case isItalic rPr of
Just False -> runStyleToTransform rPr' Just False -> runStyleToTransform rPr'
_ -> emph . (runStyleToTransform rPr') _ -> emph . (runStyleToTransform rPr')
| Just s <- rStyle rPr | Just s <- rStyle rPr
, s `elem` strongStyles = , s `elem` strongStyles =
let rPr' = rPr{rStyle = Nothing, isBold = Nothing} let rPr' = rPr{rStyle = Nothing, isBold = Nothing}
in in
case isItalic rPr' of case isBold rPr of
Just False -> runStyleToTransform rPr' Just False -> runStyleToTransform rPr'
_ -> strong . (runStyleToTransform rPr') _ -> strong . (runStyleToTransform rPr')
| Just True <- isItalic rPr = | Just True <- isItalic rPr =