diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-08-11 14:48:10 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-08-11 14:48:42 -0700 |
commit | 86d4da994a2e8a091aea325d9738f3b99ab4dbca (patch) | |
tree | fd10d87cf8391c1085cbeb9b7102f5928f5ad44f /src/Text | |
parent | 31811657fa3d097b6399ae8ec83c180ed4f38afe (diff) | |
download | pandoc-86d4da994a2e8a091aea325d9738f3b99ab4dbca.tar.gz |
EPUB reader: use walk instead of bottomUp.
This should be more efficient.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/EPUB.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/EPUB.hs b/src/Text/Pandoc/Readers/EPUB.hs index d4eef3556..052d7b832 100644 --- a/src/Text/Pandoc/Readers/EPUB.hs +++ b/src/Text/Pandoc/Readers/EPUB.hs @@ -11,7 +11,6 @@ module Text.Pandoc.Readers.EPUB import Text.XML.Light import Text.Pandoc.Definition hiding (Attr) import Text.Pandoc.Walk (walk, query) -import Text.Pandoc.Generic(bottomUp) import Text.Pandoc.Readers.HTML (readHtml) import Text.Pandoc.Options ( ReaderOptions(..), readerTrace) import Text.Pandoc.Shared (escapeURI, collapseFilePath, addMetaField) @@ -59,7 +58,7 @@ archiveToEPUB os archive = do spine <- parseSpine items content let escapedSpine = map (escapeURI . takeFileName . fst) spine Pandoc _ bs <- - foldM' (\a b -> ((a <>) . bottomUp (prependHash escapedSpine)) + foldM' (\a b -> ((a <>) . walk (prependHash escapedSpine)) `liftM` parseSpineElem root b) mempty spine let ast = coverDoc <> (Pandoc meta bs) let mediaBag = fetchImages (M.elems items) root archive ast |