Don't let autolinks create reference links.
Previously we got bad results with -t markdown --reference-links if the input contained autolinks like <http://yahoo.com>.
This commit is contained in:
parent
e9a270d03b
commit
23ca68a5c4
1 changed files with 1 additions and 1 deletions
|
@ -498,10 +498,10 @@ inlineToMarkdown opts (Link txt (src, tit)) = do
|
|||
then empty
|
||||
else text $ " \"" ++ tit ++ "\""
|
||||
let srcSuffix = if isPrefixOf "mailto:" src then drop 7 src else src
|
||||
let useRefLinks = writerReferenceLinks opts
|
||||
let useAuto = case (tit,txt) of
|
||||
("", [Code _ s]) | s == srcSuffix -> True
|
||||
_ -> False
|
||||
let useRefLinks = writerReferenceLinks opts && not useAuto
|
||||
ref <- if useRefLinks then getReference txt (src, tit) else return []
|
||||
reftext <- inlineListToMarkdown opts ref
|
||||
return $ if useAuto
|
||||
|
|
Loading…
Add table
Reference in a new issue