diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-05-24 11:49:25 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-05-24 11:49:25 -0700 |
commit | cc937eea2fbd8a7bb07672bfed3b924de8573646 (patch) | |
tree | 4006b9fe8306cc046fb79766e1e8926c5cc7373f /src/Text/Pandoc | |
parent | bfb18df27ea0eff0709494a2d7ff463f42374e01 (diff) | |
parent | 340f0aaef87acddd37df0a79267b46043223e4f0 (diff) | |
download | pandoc-cc937eea2fbd8a7bb07672bfed3b924de8573646.tar.gz |
Merge pull request #2942 from mb21/epub-reader
EPUB Reader: normalise Link id as well
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/EPUB.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/EPUB.hs b/src/Text/Pandoc/Readers/EPUB.hs index 149a7c00b..b8a0b47e7 100644 --- a/src/Text/Pandoc/Readers/EPUB.hs +++ b/src/Text/Pandoc/Readers/EPUB.hs @@ -194,8 +194,10 @@ fixInlineIRs s (Span as v) = Span (fixAttrs s as) v fixInlineIRs s (Code as code) = Code (fixAttrs s as) code -fixInlineIRs s (Link attr t ('#':url, tit)) = - Link attr t (addHash s url, tit) +fixInlineIRs s (Link as is ('#':url, tit)) = + Link (fixAttrs s as) is (addHash s url, tit) +fixInlineIRs s (Link as is t) = + Link (fixAttrs s as) is t fixInlineIRs _ v = v prependHash :: [String] -> Inline -> Inline |