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 =
let rPr' = rPr{rStyle = Nothing, isItalic = Nothing}
in
case isItalic rPr' of
case isItalic rPr of
Just False -> runStyleToTransform rPr'
_ -> emph . (runStyleToTransform rPr')
| Just s <- rStyle rPr
, s `elem` strongStyles =
let rPr' = rPr{rStyle = Nothing, isBold = Nothing}
in
case isItalic rPr' of
case isBold rPr of
Just False -> runStyleToTransform rPr'
_ -> strong . (runStyleToTransform rPr')
| Just True <- isItalic rPr =