mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-21 05:43:39 +08:00
RST reader: don't strip final underscore from absolute URI.
Partially addresses #5763.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user