diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/EPUB.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 5867b7c80..a24a872ef 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -557,6 +557,10 @@ pandocToEPUB version opts doc = do let extractLinkURL' :: Int -> Inline -> [(TS.Text, TS.Text)] extractLinkURL' num (Span (ident, _, _) _) | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)] + extractLinkURL' num (Link (ident, _, _) _ _) + | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)] + extractLinkURL' num (Image (ident, _, _) _ _) + | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)] extractLinkURL' _ _ = [] let extractLinkURL :: Int -> Block -> [(TS.Text, TS.Text)] @@ -564,6 +568,8 @@ pandocToEPUB version opts doc = do | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)] extractLinkURL num (Header _ (ident, _, _) _) | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)] + extractLinkURL num (Table (ident,_,_) _ _ _ _ _) + | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)] extractLinkURL num b = query (extractLinkURL' num) b let reftable = concat $ zipWith (\(Chapter bs) num -> |