diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2019-04-01 17:01:07 -0400 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2019-04-01 17:01:07 -0400 |
commit | 0abb858a999542df3337e942e76ca4f82a979490 (patch) | |
tree | 050a377859329165fe68a26be254646546cbd422 /src | |
parent | 9a77da475e418e9ab55ee20878ba750f28f67c8e (diff) | |
download | pandoc-0abb858a999542df3337e942e76ca4f82a979490.tar.gz |
PowerPoint writer: Remove handoutsMasterList from template presentation.xml
We don't build it at the moment, so it was causing corruption.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/Powerpoint/Output.hs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs index db16d5ada..da7106325 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs @@ -1619,16 +1619,18 @@ presentationToPresentationElement pres@(Presentation _ slds) = do -- if there's a notesMasterIdLst in the presentation.xml file, -- we want to remove it. We then want to put our own, if - -- necessary, after the slideMasterIdLst element. + -- necessary, after the slideMasterIdLst element. We also remove + -- handouts master, since we don't want it. - removeNotesMaster' :: Content -> [Content] - removeNotesMaster' (Elem e) = case elName e of + removeUnwantedMaster' :: Content -> [Content] + removeUnwantedMaster' (Elem e) = case elName e of (QName "notesMasterIdLst" _ _) -> [] + (QName "handoutMasterIdLst" _ _) -> [] _ -> [Elem e] - removeNotesMaster' ct = [ct] + removeUnwantedMaster' ct = [ct] - removeNotesMaster :: [Content] -> [Content] - removeNotesMaster = concatMap removeNotesMaster' + removeUnwantedMaster :: [Content] -> [Content] + removeUnwantedMaster = concatMap removeUnwantedMaster' insertNotesMaster' :: Content -> [Content] insertNotesMaster' (Elem e) = case elName e of @@ -1642,7 +1644,7 @@ presentationToPresentationElement pres@(Presentation _ slds) = do else id newContent = insertNotesMaster $ - removeNotesMaster $ + removeUnwantedMaster $ map modifySldIdLst $ elContent element |