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