git.iko.soy/typeable/pandoc
on master help sign in
Powerpoint writer: Handle Quoted Inlines

Closes: #4532

commit394f4536e10717d16730e1f03007b25c7f5f6f4f authorJesse Rosenthal <jrosenthal@jhu.edu> dateThu 5 Apr 2018, 13:55 (9 years ago) parent7e99178
1 file changed+13−2
src/Text/Pandoc/Writers/Powerpoint/Presentation.hs+13−2
src/Text/Pandoc/Writers/Powerpoint/Presentation.hs+13−2
@@ -376,9 +376,20 @@ inlineToParElems (Note blks) = do
376376 modify $ \st -> st { stNoteIds = M.insert curNoteId blks notes }
377377 local (\env -> env{envRunProps = (envRunProps env){rLink = Just $ InternalTarget endNotesSlideId}}) $
378378 inlineToParElems $ Superscript [Str $ show curNoteId]
379−inlineToParElems (Span _ ils) = concatMapM inlineToParElems ils
379+inlineToParElems (Span _ ils) = inlinesToParElems ils
380+inlineToParElems (Quoted quoteType ils) =
381+ inlinesToParElems $ [Str open] ++ ils ++ [Str close]
382+ where (open, close) = case quoteType of
383+ SingleQuote -> ("\x2018", "\x2019")
384+ DoubleQuote -> ("\x201C", "\x201D")
380385inlineToParElems (RawInline _ _) = return []
381−inlineToParElems _ = return []
386+inlineToParElems (Cite _ ils) = inlinesToParElems ils
387+-- Note: we shouldn't reach this, because images should be handled at
388+-- the shape level, but should that change in the future, we render
389+-- the alt text.
390+inlineToParElems (Image _ alt _) = inlinesToParElems alt
391+
392+
382393
383394isListType :: Block -> Bool
384395isListType (OrderedList _ _) = True