diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-08-10 18:45:00 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-08-10 18:45:00 -0700 |
commit | 02a125d0aa8becd258c99b27c5e30116f0cbacb4 (patch) | |
tree | 71d9b34587e9e6ee90c4b6df04f1bddf4e114b6b /src/Text/Pandoc/Writers/RTF.hs | |
parent | 9152fa1a95346e26bc290b3f5018b2eeb5d4e077 (diff) | |
download | pandoc-02a125d0aa8becd258c99b27c5e30116f0cbacb4.tar.gz |
Use walk, walkM in place of bottomUp, bottomUpM when possible.
They are significantly faster.
Diffstat (limited to 'src/Text/Pandoc/Writers/RTF.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/RTF.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs index 6d2b1229d..0e8ce2ece 100644 --- a/src/Text/Pandoc/Writers/RTF.hs +++ b/src/Text/Pandoc/Writers/RTF.hs @@ -34,7 +34,7 @@ import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared import Text.Pandoc.Readers.TeXMath import Text.Pandoc.Templates (renderTemplate') -import Text.Pandoc.Generic (bottomUpM) +import Text.Pandoc.Walk import Data.List ( isSuffixOf, intercalate ) import Data.Char ( ord, chr, isDigit, toLower ) import System.FilePath ( takeExtension ) @@ -70,7 +70,7 @@ rtfEmbedImage x = return x -- images embedded as encoded binary data. writeRTFWithEmbeddedImages :: WriterOptions -> Pandoc -> IO String writeRTFWithEmbeddedImages options doc = - writeRTF options `fmap` bottomUpM rtfEmbedImage doc + writeRTF options `fmap` walkM rtfEmbedImage doc -- | Convert Pandoc to a string in rich text format. writeRTF :: WriterOptions -> Pandoc -> String |