@@ -644,9 +644,9 @@ inlineToMarkdown opts (Link txt (src, tit)) = do
644 then empty
644 then empty
645 else text $ " \"" ++ tit ++ "\""
645 else text $ " \"" ++ tit ++ "\""
646 let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
646 let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
647− let useAuto = case (tit,txt) of
647+ let useAuto = case txt of
648− ("", [Str s]) | escapeURI s == srcSuffix -> True
648+ [Str s] | escapeURI s == srcSuffix -> True
649− _ -> False
649+ _ -> False
650 let useRefLinks = writerReferenceLinks opts && not useAuto
650 let useRefLinks = writerReferenceLinks opts && not useAuto
651 ref <- if useRefLinks then getReference txt (src, tit) else return []
651 ref <- if useRefLinks then getReference txt (src, tit) else return []
652 reftext <- inlineListToMarkdown opts ref
652 reftext <- inlineListToMarkdown opts ref