RST reader: don't strip final underscore from absolute URI.
Partially addresses #5763.
This commit is contained in:
parent
746c92a41a
commit
18d11103f5
1 changed files with 7 additions and 3 deletions
|
@ -1497,9 +1497,13 @@ explicitLink = try $ do
|
|||
then B.str src
|
||||
else label'
|
||||
-- `link <google_>` is a reference link to _google!
|
||||
((src',tit),attr) <- case reverse src of
|
||||
'_':xs -> lookupKey [] (toKey (reverse xs))
|
||||
_ -> return ((src, ""), nullAttr)
|
||||
((src',tit),attr) <-
|
||||
if isURI src
|
||||
then return ((src, ""), nullAttr)
|
||||
else
|
||||
case reverse src of
|
||||
'_':xs -> lookupKey [] (toKey (reverse xs))
|
||||
_ -> return ((src, ""), nullAttr)
|
||||
return $ B.linkWith attr (escapeURI src') tit label''
|
||||
|
||||
citationName :: PandocMonad m => RSTParser m String
|
||||
|
|
Loading…
Add table
Reference in a new issue