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

commit6aae43998082280a356e2dda3df77c021abed58f authorJesse Rosenthal <jrosenthal@jhu.edu> dateWed 3 Jan 2018, 15:33 (9 years ago) parent13990c0
1 file changed+6−6
src/Text/Pandoc/Writers/Powerpoint.hs+6−6
src/Text/Pandoc/Writers/Powerpoint.hs+6−6
@@ -351,7 +351,7 @@ inlineToParElems (Link _ ils (url, title)) = do
351351 local (\r ->r{envRunProps = (envRunProps r){rLink = Just (url, title)}}) $
352352 inlinesToParElems ils
353353inlineToParElems (Code _ str) = do
354− local (\r ->r{envRunProps = def{rPropCode = True}}) $
354+ local (\r ->r{envRunProps = (envRunProps r){rPropCode = True}}) $
355355 inlineToParElems $ Str str
356356inlineToParElems (Math mathtype str) =
357357 return [MathElem mathtype (TeXString str)]
@@ -1112,13 +1112,13 @@ noteSize = 18
11121112paraElemToElement :: PandocMonad m => ParaElem -> P m Element
11131113paraElemToElement Break = return $ mknode "a:br" [] ()
11141114paraElemToElement (Run rpr s) = do
1115− let attrs =
1115+ let sizeAttrs = case rPropForceSize rpr of
1116+ Just n -> [("sz", (show $ n * 100))]
1117+ Nothing -> []
1118+ attrs = sizeAttrs ++
11161119 if rPropCode rpr
11171120 then []
1118− else (case rPropForceSize rpr of
1119− Just n -> [("sz", (show $ n * 100))]
1120− Nothing -> []) ++
1121− (if rPropBold rpr then [("b", "1")] else []) ++
1121+ else (if rPropBold rpr then [("b", "1")] else []) ++
11221122 (if rPropItalics rpr then [("i", "1")] else []) ++
11231123 (case rStrikethrough rpr of
11241124 Just NoStrike -> [("strike", "noStrike")]