diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/Powerpoint/Output.hs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs index 12b338b1c..1ed021086 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs @@ -1340,7 +1340,18 @@ presentationToPresentationElement pres = do _ -> Elem e modifySldIdLst ct = ct - newContent = map modifySldIdLst $ elContent element + removeSpeakerNotes' :: Content -> [Content] + removeSpeakerNotes' (Elem e) = case elName e of + (QName "notesMasterIdLst" _ _) -> [] + _ -> [Elem e] + removeSpeakerNotes' ct = [ct] + + removeSpeakerNotes :: [Content] -> [Content] + removeSpeakerNotes = if not (hasSpeakerNotes pres) + then concatMap removeSpeakerNotes' + else id + + newContent = removeSpeakerNotes $ map modifySldIdLst $ elContent element return $ element{elContent = newContent} |