If I do:
let &makeprg = 'pandoc --from=markdown --output %:p:r:S.$* -- %:p:S' Then:
:make html generate the command:
pandoc --from=markdown --output "myfolder/myfile".html -- "myfolder/myfile" The problem is with the %:p:r:S.$* part. The the :S that escape the path for the shell is actually quoting the path moving the argument (i.e. html) outside the quote.
You get "myfolder/myfile".html where you probably like to have "myfolder/myfile.html"
I would not use the shell escape (i.e. :S) and quote the path explicitly: "%:p:r.$*".
Maybe you would like to do:
let &makeprg = 'pandoc --from=markdown --output "%:p:r.$*" -- %:p:S' that generates:
pandoc --from=markdown --output "myfolder/myfile.html" -- "myfolder/myfile"