aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-04 10:49:05 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-04 10:49:05 -0700
commit5b7d04984bb5c053c80b1a3e8d9779785613d583 (patch)
treee2b4908a2664061d9218803e2948350e9ce58edf /src/Text/Pandoc
parent65cf5cfe7bed618eced186948638ffe6ecd2db32 (diff)
downloadpandoc-5b7d04984bb5c053c80b1a3e8d9779785613d583.tar.gz
Docx reader: trigger bold/italic with bCs, iCs.
These are variants for "complex scripts" like Arabic and are now treated just like b, i (bold, italic). Colses #4947.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Docx/Parse.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs
index cbf865de8..b4e52de14 100644
--- a/src/Text/Pandoc/Readers/Docx/Parse.hs
+++ b/src/Text/Pandoc/Readers/Docx/Parse.hs
@@ -1056,8 +1056,10 @@ elemToRunStyle ns element parentStyle
| Just rPr <- findChildByName ns "w" "rPr" element =
RunStyle
{
- isBold = checkOnOff ns rPr (elemName ns "w" "b")
- , isItalic = checkOnOff ns rPr (elemName ns "w" "i")
+ isBold = checkOnOff ns rPr (elemName ns "w" "b") `mplus`
+ checkOnOff ns rPr (elemName ns "w" "bCs")
+ , isItalic = checkOnOff ns rPr (elemName ns "w" "i") `mplus`
+ checkOnOff ns rPr (elemName ns "w" "iCs")
, isSmallCaps = checkOnOff ns rPr (elemName ns "w" "smallCaps")
, isStrike = checkOnOff ns rPr (elemName ns "w" "strike")
, rVertAlign =