@@ -557,6 +557,10 @@ pandocToEPUB version opts doc = do
557 let extractLinkURL' :: Int -> Inline -> [(TS.Text, TS.Text)]
557 let extractLinkURL' :: Int -> Inline -> [(TS.Text, TS.Text)]
558 extractLinkURL' num (Span (ident, _, _) _)
558 extractLinkURL' num (Span (ident, _, _) _)
559 | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)]
559 | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)]
560+ extractLinkURL' num (Link (ident, _, _) _ _)
561+ | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)]
562+ extractLinkURL' num (Image (ident, _, _) _ _)
563+ | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)]
560 extractLinkURL' _ _ = []
564 extractLinkURL' _ _ = []
562 let extractLinkURL :: Int -> Block -> [(TS.Text, TS.Text)]
566 let extractLinkURL :: Int -> Block -> [(TS.Text, TS.Text)]
@@ -564,6 +568,8 @@ pandocToEPUB version opts doc = do
564 | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)]
568 | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)]
565 extractLinkURL num (Header _ (ident, _, _) _)
569 extractLinkURL num (Header _ (ident, _, _) _)
566 | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)]
570 | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)]
571+ extractLinkURL num (Table (ident,_,_) _ _ _ _ _)
572+ | not (TS.null ident) = [(ident, TS.pack (showChapter num) <> "#" <> ident)]
567 extractLinkURL num b = query (extractLinkURL' num) b
573 extractLinkURL num b = query (extractLinkURL' num) b
569 let reftable = concat $ zipWith (\(Chapter bs) num ->
575 let reftable = concat $ zipWith (\(Chapter bs) num ->