Fixed a bug in Docbook writer: email links with text were being
incorrectly treated as autolinks. git-svn-id: https://pandoc.googlecode.com/svn/trunk@809 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
d488dd0f66
commit
cf87eb854d
1 changed files with 6 additions and 1 deletions
|
@ -255,7 +255,12 @@ inlineToDocbook opts LineBreak =
|
|||
inlineToDocbook opts Space = char ' '
|
||||
inlineToDocbook opts (Link txt (src, tit)) =
|
||||
if isPrefixOf "mailto:" src
|
||||
then inTagsSimple "email" $ text (escapeStringForXML $ drop 7 src)
|
||||
then let src' = drop 7 src
|
||||
emailLink = inTagsSimple "email" $ text (escapeStringForXML $ src')
|
||||
in if txt == [Code src']
|
||||
then emailLink
|
||||
else inlinesToDocbook opts txt <+> char '(' <> emailLink <>
|
||||
char ')'
|
||||
else inTags False "ulink" [("url", src)] $ inlinesToDocbook opts txt
|
||||
inlineToDocbook opts (Image alt (src, tit)) =
|
||||
let titleDoc = if null tit
|
||||
|
|
Loading…
Reference in a new issue