summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Powerpoint.hs
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2018-01-03 15:33:18 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2018-01-03 15:33:18 -0500
commit6aae43998082280a356e2dda3df77c021abed58f (patch)
tree0c8e34dfdc09b52a6080987900207b8a6365c29e /src/Text/Pandoc/Writers/Powerpoint.hs
parent13990c05017baa473f77f1c827d902b40f42b6a4 (diff)
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.
Diffstat (limited to 'src/Text/Pandoc/Writers/Powerpoint.hs')
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint.hs12
1 files changed, 6 insertions, 6 deletions
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")]