PowerPoint writer: make inline code inherit code size.

Previously (a) the code size wasn't set when we force size, and (b)
the properties was set from the default, instead of inheriting. Both
of those problems were fixed.
This commit is contained in:
Jesse Rosenthal
2018-01-03 15:33:18 -05:00
parent 13990c0501
commit 6aae439980
+6 -6
View File
@@ -351,7 +351,7 @@ inlineToParElems (Link _ ils (url, title)) = do
local (\r ->r{envRunProps = (envRunProps r){rLink = Just (url, title)}}) $
inlinesToParElems ils
inlineToParElems (Code _ str) = do
local (\r ->r{envRunProps = def{rPropCode = True}}) $
local (\r ->r{envRunProps = (envRunProps r){rPropCode = True}}) $
inlineToParElems $ Str str
inlineToParElems (Math mathtype str) =
return [MathElem mathtype (TeXString str)]
@@ -1112,13 +1112,13 @@ noteSize = 18
paraElemToElement :: PandocMonad m => ParaElem -> P m Element
paraElemToElement Break = return $ mknode "a:br" [] ()
paraElemToElement (Run rpr s) = do
let attrs =
let sizeAttrs = case rPropForceSize rpr of
Just n -> [("sz", (show $ n * 100))]
Nothing -> []
attrs = sizeAttrs ++
if rPropCode rpr
then []
else (case rPropForceSize rpr of
Just n -> [("sz", (show $ n * 100))]
Nothing -> []) ++
(if rPropBold rpr then [("b", "1")] else []) ++
else (if rPropBold rpr then [("b", "1")] else []) ++
(if rPropItalics rpr then [("i", "1")] else []) ++
(case rStrikethrough rpr of
Just NoStrike -> [("strike", "noStrike")]