diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2011-12-26 23:18:32 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2011-12-26 23:18:32 -0800 |
commit | de7902154377c6a93eeb91d95d2a27e794cac683 (patch) | |
tree | 5c27b49c2b4cf60036276b7859a23d533002d4bc /src | |
parent | dd96267626e6f52e49c912cfe90380de2df469e5 (diff) | |
download | pandoc-de7902154377c6a93eeb91d95d2a27e794cac683.tar.gz |
EPUB writer: Make external (absolute) links active.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/EPUB.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 55da4554d..cd4b3fce6 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -46,7 +46,7 @@ import Text.Pandoc.UUID import Text.Pandoc.Writers.HTML import Text.Pandoc.Writers.Markdown ( writePlain ) import Data.Char ( toLower ) -import Network.URI ( unEscapeString ) +import Network.URI ( unEscapeString, isRelativeReference ) -- | Produce an EPUB file from a Pandoc document. writeEPUB :: Maybe String -- ^ EPUB stylesheet specified at command line @@ -271,7 +271,7 @@ transformInlines (MathML _) _ _ (x@(Math _ _) : xs) = do result = if "<math" `isPrefixOf` mathml then inOps else mathml return $ RawInline "html" result : xs transformInlines _ _ _ (RawInline _ _ : xs) = return $ Str "" : xs -transformInlines _ _ _ (Link lab (_,_) : xs) = return $ lab ++ xs +transformInlines _ _ _ (Link lab (src,_) : xs) | isRelativeReference src = return $ lab ++ xs transformInlines _ _ _ xs = return xs transformBlock :: Block -> Block |