diff options
author | mb21 <mb21@users.noreply.github.com> | 2015-07-26 18:30:47 +0200 |
---|---|---|
committer | mb21 <mb21@users.noreply.github.com> | 2015-08-07 12:38:37 +0200 |
commit | a010b83a7542d1324bde3d248c24faae9e681dbd (patch) | |
tree | ed0727d31576f5d07e5e31d6611e124b54c0b823 /src/Text/Pandoc/Readers/EPUB.hs | |
parent | e44fc547a5d0ef67c68011c23563fd82320bc2aa (diff) |
Updated readers, writers and README for link attribute
Diffstat (limited to 'src/Text/Pandoc/Readers/EPUB.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/EPUB.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/EPUB.hs b/src/Text/Pandoc/Readers/EPUB.hs index 04edf4c6a..fb86f1286 100644 --- a/src/Text/Pandoc/Readers/EPUB.hs +++ b/src/Text/Pandoc/Readers/EPUB.hs @@ -192,20 +192,20 @@ fixInlineIRs s (Span as v) = Span (fixAttrs s as) v fixInlineIRs s (Code as code) = Code (fixAttrs s as) code -fixInlineIRs s (Link t ('#':url, tit)) = - Link t (addHash s url, tit) +fixInlineIRs s (Link attr t ('#':url, tit)) = + Link attr t (addHash s url, tit) fixInlineIRs _ v = v normalisePath :: Inline -> Inline -normalisePath (Link t (url, tit)) = +normalisePath (Link attr t (url, tit)) = let (path, uid) = span (/= '#') url in - Link t (takeFileName path ++ uid, tit) + Link attr t (takeFileName path ++ uid, tit) normalisePath s = s prependHash :: [String] -> Inline -> Inline -prependHash ps l@(Link is (url, tit)) +prependHash ps l@(Link attr is (url, tit)) | or [s `isPrefixOf` url | s <- ps] = - Link is ('#':url, tit) + Link attr is ('#':url, tit) | otherwise = l prependHash _ i = i |