summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/EPUB.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-08-11 14:48:10 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-08-11 14:48:42 -0700
commit86d4da994a2e8a091aea325d9738f3b99ab4dbca (patch)
treefd10d87cf8391c1085cbeb9b7102f5928f5ad44f /src/Text/Pandoc/Readers/EPUB.hs
parent31811657fa3d097b6399ae8ec83c180ed4f38afe (diff)
EPUB reader: use walk instead of bottomUp.
This should be more efficient.
Diffstat (limited to 'src/Text/Pandoc/Readers/EPUB.hs')
-rw-r--r--src/Text/Pandoc/Readers/EPUB.hs3
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