From 2ec1b2d2069fa987be5c6560510f99542110167b Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Tue, 3 Mar 2026 00:24:46 -0500 Subject: [PATCH] fix(presets): parenthesize gsub output to suppress redundant-return-value --- lua/preview/presets.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/preview/presets.lua b/lua/preview/presets.lua index 098b939..8a414e8 100644 --- a/lua/preview/presets.lua +++ b/lua/preview/presets.lua @@ -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')) }