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

Closes .
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
src/Text/Pandoc/Readers
test

View file

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

View file

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

View file

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

View file

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