git.iko.soy/typeable/pandoc
on master help sign in
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.

commit5b7d04984bb5c053c80b1a3e8d9779785613d583 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 4 Oct 2018, 10:49 (8 years ago) parent65cf5cf
1 file changed+4−2
src/Text/Pandoc/Readers/Docx/Parse.hs+4−2
src/Text/Pandoc/Readers/Docx/Parse.hs+4−2
@@ -1056,8 +1056,10 @@ elemToRunStyle ns element parentStyle
10561056 | Just rPr <- findChildByName ns "w" "rPr" element =
10571057 RunStyle
10581058 {
1059− isBold = checkOnOff ns rPr (elemName ns "w" "b")
1060− , isItalic = checkOnOff ns rPr (elemName ns "w" "i")
1059+ isBold = checkOnOff ns rPr (elemName ns "w" "b") `mplus`
1060+ checkOnOff ns rPr (elemName ns "w" "bCs")
1061+ , isItalic = checkOnOff ns rPr (elemName ns "w" "i") `mplus`
1062+ checkOnOff ns rPr (elemName ns "w" "iCs")
10611063 , isSmallCaps = checkOnOff ns rPr (elemName ns "w" "smallCaps")
10621064 , isStrike = checkOnOff ns rPr (elemName ns "w" "strike")
10631065 , rVertAlign =