I'm assuming that "autolink" in the question refers to links such as <https://example.com>. We can use an implementation detail to prevent pandoc from generating these.
First, let's see how pandoc represents this kind of link internally:
$ pandoc -t native <<< '<https://example.org>'
[ Para
[ Link
( "" , [ "uri" ] , [] )
[ Str "https://example.org" ]
( "https://example.org" , "" )
]
]
This means that pandoc treats this as a link that has the link target as title. But we also see that the link has a class uri. The Markdown generating code expects this exact structure for autolinks.
We can modify these links so it no longer matches the expected structure: for that, we remove the class and add an empty Str element to the link label with a Lua filter:
--- file: unautolink.lua
function Link (link)
if link.classes == pandoc.List{"uri"} then
-- remove uri class
link.classes[1] = nil
-- add an empty string to the link label
link.content:insert(pandoc.Str '')
end
return link
end
Autolinks are turned into normal links when using this filter:
$ pandoc -t gfm -L noautolink.lua <<< '<https://example.org>'
[https://example.org](https://example.org)