fix(presets): parenthesize gsub output to suppress redundant-return-value

This commit is contained in:
Barrett Ruth 2026-03-03 00:24:46 -05:00
parent 26c15a701e
commit 2ec1b2d206
Signed by: barrett
GPG key ID: A6C96C9349D2FC81

View file

@ -8,7 +8,7 @@ M.typst = {
return { ctx.file }
end,
output = function(ctx)
return ctx.file:gsub('%.typ$', '.pdf')
return (ctx.file:gsub('%.typ$', '.pdf'))
end,
open = { 'xdg-open' },
}
@ -21,7 +21,7 @@ M.latex = {
return { '-pdf', '-interaction=nonstopmode', ctx.file }
end,
output = function(ctx)
return ctx.file:gsub('%.tex$', '.pdf')
return (ctx.file:gsub('%.tex$', '.pdf'))
end,
clean = function(ctx)
return { 'latexmk', '-c', ctx.file }
@ -38,7 +38,7 @@ M.markdown = {
return { ctx.file, '-s', '--embed-resources', '-o', output }
end,
output = function(ctx)
return ctx.file:gsub('%.md$', '.html')
return (ctx.file:gsub('%.md$', '.html'))
end,
clean = function(ctx)
return { 'rm', '-f', (ctx.file:gsub('%.md$', '.html')) }
@ -65,7 +65,7 @@ M.github = {
}
end,
output = function(ctx)
return ctx.file:gsub('%.md$', '.html')
return (ctx.file:gsub('%.md$', '.html'))
end,
clean = function(ctx)
return { 'rm', '-f', (ctx.file:gsub('%.md$', '.html')) }