diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-01-13 23:54:37 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-01-13 23:54:37 -0800 |
commit | ceb8357b41d0fd20ca4af617c9868f60ee7d370f (patch) | |
tree | d3b14de463e7bc92d72fec78eb06becf15a03fb5 | |
parent | 83bb1de3f592b21ba2af01c321a4ec74d1264530 (diff) | |
download | pandoc-ceb8357b41d0fd20ca4af617c9868f60ee7d370f.tar.gz |
EPUB writer: Allow raw HTML.
-rw-r--r-- | src/Text/Pandoc/Writers/EPUB.hs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index af907a809..e78e79bb5 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -94,7 +94,7 @@ writeEPUB mbStylesheet opts doc@(Pandoc meta _) = do -- handle pictures picsRef <- newIORef [] - Pandoc _ blocks <- liftM (bottomUp transformBlock) $ bottomUpM + Pandoc _ blocks <- bottomUpM (transformInlines (writerHTMLMathMethod opts) sourceDir picsRef) doc pics <- readIORef picsRef let readPicEntry (oldsrc, newsrc) = readEntry [] oldsrc >>= \e -> @@ -277,13 +277,8 @@ transformInlines (MathML _) _ _ (x@(Math _ _) : xs) = do "</ops:switch>" result = if "<math" `isPrefixOf` mathml then inOps else mathml return $ RawInline "html" result : xs -transformInlines _ _ _ (RawInline _ _ : xs) = return $ Str "" : xs transformInlines _ _ _ xs = return xs -transformBlock :: Block -> Block -transformBlock (RawBlock _ _) = Null -transformBlock x = x - (!) :: Node t => (t -> Element) -> [(String, String)] -> t -> Element (!) f attrs n = add_attrs (map (\(k,v) -> Attr (unqual k) v) attrs) (f n) |