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/Writers/RST.hs | |
parent | e44fc547a5d0ef67c68011c23563fd82320bc2aa (diff) | |
download | pandoc-a010b83a7542d1324bde3d248c24faae9e681dbd.tar.gz |
Updated readers, writers and README for link attribute
Diffstat (limited to 'src/Text/Pandoc/Writers/RST.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/RST.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index 4b68984d0..a65d6f8bb 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -390,7 +390,7 @@ inlineListToRST lst = isComplex (Strikeout _) = True isComplex (Superscript _) = True isComplex (Subscript _) = True - isComplex (Link _ _) = True + isComplex (Link _ _ _) = True isComplex (Image _ _ _) = True isComplex (Code _ _) = True isComplex (Math _ _) = True @@ -442,17 +442,17 @@ inlineToRST (RawInline f x) inlineToRST (LineBreak) = return cr -- there's no line break in RST (see Para) inlineToRST Space = return space -- autolink -inlineToRST (Link [Str str] (src, _)) +inlineToRST (Link _ [Str str] (src, _)) | isURI src && if "mailto:" `isPrefixOf` src then src == escapeURI ("mailto:" ++ str) else src == escapeURI str = do let srcSuffix = fromMaybe src (stripPrefix "mailto:" src) return $ text srcSuffix -inlineToRST (Link [Image attr alt (imgsrc,imgtit)] (src, _tit)) = do +inlineToRST (Link _ [Image attr alt (imgsrc,imgtit)] (src, _tit)) = do label <- registerImage attr alt (imgsrc,imgtit) (Just src) return $ "|" <> label <> "|" -inlineToRST (Link txt (src, tit)) = do +inlineToRST (Link _ txt (src, tit)) = do useReferenceLinks <- get >>= return . writerReferenceLinks . stOptions linktext <- inlineListToRST $ normalizeSpaces txt if useReferenceLinks |