From cc46667953b609d87bbf5611f50843871b304a0c Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sun, 7 Nov 2021 21:08:20 -0800
Subject: [PATCH] LaTeX reader: add 'uri' class when parsing `\url`.

Closes #7672.
---
 src/Text/Pandoc/Readers/LaTeX.hs | 4 ++--
 test/command/3681.md             | 2 +-
 test/command/4832.md             | 4 ++--
 test/latex-reader.native         | 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 15148debb..25acc0f7e 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -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
diff --git a/test/command/3681.md b/test/command/3681.md
index 3e6c71a47..dc6b90860 100644
--- a/test/command/3681.md
+++ b/test/command/3681.md
@@ -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" , "" )
             ]
diff --git a/test/command/4832.md b/test/command/4832.md
index 5e9f2ac77..ec636b2b7 100644
--- a/test/command/4832.md
+++ b/test/command/4832.md
@@ -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" , "" )
     ]
diff --git a/test/latex-reader.native b/test/latex-reader.native
index 2be447c0d..32ee86899 100644
--- a/test/latex-reader.native
+++ b/test/latex-reader.native
@@ -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/" , "" )
           ]