From 22418bff8bcac4377ebf975cd48f716823867979 Mon Sep 17 00:00:00 2001 From: yetone Date: Fri, 30 May 2025 12:55:15 +0800 Subject: [PATCH] fix: more reliable remove_indentation (#2102) --- lua/avante/utils/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/avante/utils/init.lua b/lua/avante/utils/init.lua index f209440..000e750 100644 --- a/lua/avante/utils/init.lua +++ b/lua/avante/utils/init.lua @@ -576,7 +576,7 @@ end --- remove indentation from code: spaces or tabs function M.remove_indentation(code) if not code then return code end - return code:gsub("^%s*", "") + return code:gsub("^%s*", ""):gsub("%s*$", "") end function M.relative_path(absolute)