LaTeX reader: add 'uri' class when parsing \url.

Closes #7672.
This commit is contained in:
John MacFarlane 2021-11-07 21:08:20 -08:00
parent 881b45209e
commit cc46667953
4 changed files with 8 additions and 8 deletions

View file

@ -390,8 +390,8 @@ inlineCommands = M.unions
unescapeURL .
removeDoubleQuotes $ untokenize src)
-- hyperref
, ("url", (\url -> link url "" (str url)) . unescapeURL . untokenize <$>
bracedUrl)
, ("url", (\url -> linkWith ("",["uri"],[]) url "" (str url))
. unescapeURL . untokenize <$> bracedUrl)
, ("nolinkurl", code . unescapeURL . untokenize <$> bracedUrl)
, ("href", do url <- bracedUrl
sp

View file

@ -45,7 +45,7 @@ Software developers create \cicd pipelines to… Following issue can be resolved
, Note
[ Para
[ Link
( "" , [] , [] )
( "" , [ "uri" ] , [] )
[ Str "https://en.wikipedia.org/wiki/CI/CD" ]
( "https://en.wikipedia.org/wiki/CI/CD" , "" )
]

View file

@ -4,7 +4,7 @@
^D
[ Para
[ Link
( "" , [] , [] )
( "" , [ "uri" ] , [] )
[ Str "http://example.com/foo%20bar.htm" ]
( "http://example.com/foo%20bar.htm" , "" )
]
@ -17,7 +17,7 @@
^D
[ Para
[ Link
( "" , [] , [] )
( "" , [ "uri" ] , [] )
[ Str "http://example.com/foo{bar}.htm" ]
( "http://example.com/foo{bar}.htm" , "" )
]

View file

@ -1868,7 +1868,7 @@ Pandoc
, Str "ampersand:"
, Space
, Link
( "" , [] , [] )
( "" , [ "uri" ] , [] )
[ Str "http://example.com/?foo=1&bar=2" ]
( "http://example.com/?foo=1&bar=2" , "" )
]
@ -1878,7 +1878,7 @@ Pandoc
]
, [ Para
[ Link
( "" , [] , [] )
( "" , [ "uri" ] , [] )
[ Str "http://example.com/" ]
( "http://example.com/" , "" )
]
@ -1902,7 +1902,7 @@ Pandoc
[ Str "Blockquoted:"
, Space
, Link
( "" , [] , [] )
( "" , [ "uri" ] , [] )
[ Str "http://example.com/" ]
( "http://example.com/" , "" )
]