Docx reader: allow sub/superscript verbatims.

Verbatim usually shuts off all other run styles, but we don't want it to
shut off sub/superscript.
This commit is contained in:
Jesse Rosenthal
2015-02-21 08:41:09 -05:00
parent 3e81c3a0a6
commit 55d2ce751a
+6 -1
View File
@@ -277,7 +277,12 @@ runToInlines :: Run -> DocxContext Inlines
runToInlines (Run rs runElems)
| Just (s, _) <- rStyle rs
, s `elem` codeStyles =
return $ code $ concatMap runElemToString runElems
let rPr = resolveDependentRunStyle rs
in
return $ case rVertAlign rPr of
Just SupScrpt -> superscript $ code $ concatMap runElemToString runElems
Just SubScrpt -> subscript $ code $ concatMap runElemToString runElems
_ -> code $ concatMap runElemToString runElems
| otherwise = do
let ils = concatReduce (map runElemToInlines runElems)
return $ (runStyleToTransform $ resolveDependentRunStyle rs) ils