RST reader: don't strip final underscore from absolute URI.

Partially addresses #5763.
This commit is contained in:
John MacFarlane 2019-09-29 13:01:00 -07:00
parent 746c92a41a
commit 18d11103f5

View file

@ -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