git.iko.soy/typeable/pandoc
on master help sign in
Removed link title in asciidoc.

Apparently it is not supported.

commitf5af4903dfdad6b849f708f476832bdb07cca6a7 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 18 Nov 2011, 18:31 (15 years ago) parent965c941
1 file changed+6−9
src/Text/Pandoc/Writers/Asciidoc.hs+6−9
src/Text/Pandoc/Writers/Asciidoc.hs+6−9
@@ -326,26 +326,23 @@ inlineToAsciidoc _ (RawInline _ _) = return empty
326326inlineToAsciidoc _ (LineBreak) = return $ " +" <> cr
327327inlineToAsciidoc _ Space = return space
328328inlineToAsciidoc opts (Cite _ lst) = inlineListToAsciidoc opts lst
329−inlineToAsciidoc opts (Link txt (src', tit)) = do
329+inlineToAsciidoc opts (Link txt (src', _tit)) = do
330330-- relative: link:downloads/foo.zip[download foo.zip]
331331-- abs: http://google.cod[Google]
332332-- or my@email.com[email john]
333333 linktext <- inlineListToAsciidoc opts txt
334− let linktitle = if null tit
335− then empty
336− else text $ ",title=\"" ++ tit ++ "\""
337334 let src = unescapeURI src'
338− let isRelative = ':' `elem` src
335+ let isRelative = ':' `notElem` src
339336 let prefix = if isRelative
340337 then text "link:"
341338 else empty
342339 let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
343− let useAuto = case (tit,txt) of
344− ("", [Code _ s]) | s == srcSuffix -> True
345− _ -> False
340+ let useAuto = case txt of
341+ [Code _ s] | s == srcSuffix -> True
342+ _ -> False
346343 return $ if useAuto
347344 then text srcSuffix
348− else prefix <> text src <> "[" <> linktext <> linktitle <> "]"
345+ else prefix <> text src <> "[" <> linktext <> "]"
349346inlineToAsciidoc opts (Image alternate (src', tit)) = do
350347-- image:images/logo.png[Company logo, title="blah"]
351348 let txt = if (null alternate) || (alternate == [Str ""])