From 6aae43998082280a356e2dda3df77c021abed58f Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Wed, 3 Jan 2018 15:33:18 -0500 Subject: 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. --- src/Text/Pandoc/Writers/Powerpoint.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/Powerpoint.hs b/src/Text/Pandoc/Writers/Powerpoint.hs index 50b48fd87..32b7e2ec6 100644 --- a/src/Text/Pandoc/Writers/Powerpoint.hs +++ b/src/Text/Pandoc/Writers/Powerpoint.hs @@ -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")] -- cgit v1.2.3