git.iko.soy/typeable/pandoc
on master help sign in
PowerPoint writer: Register notes to state.
f76b4fcJesse Rosenthal
src/Text/Pandoc/Writers/Powerpoint.hs+8
@@ -353,6 +353,14 @@ inlineToParElems (Code _ str) = do
353 inlineToParElems $ Str str
353 inlineToParElems $ Str str
354inlineToParElems (Math mathtype str) =
354inlineToParElems (Math mathtype str) =
355 return [MathElem mathtype (TeXString str)]
355 return [MathElem mathtype (TeXString str)]
356+inlineToParElems (Note blks) = do
357+ notes <- gets stNoteIds
358+ let maxNoteId = case M.keys notes of
359+ [] -> 0
360+ lst -> maximum lst
361+ curNoteId = maxNoteId + 1
362+ modify $ \st -> st { stNoteIds = M.insert curNoteId blks notes }
363+ inlineToParElems $ Superscript [Str $ show curNoteId]
356inlineToParElems (Span _ ils) = concatMapM inlineToParElems ils
364inlineToParElems (Span _ ils) = concatMapM inlineToParElems ils
357inlineToParElems (RawInline _ _) = return []
365inlineToParElems (RawInline _ _) = return []
358inlineToParElems _ = return []
366inlineToParElems _ = return []