summaryrefslogtreecommitdiff
path: root/script/utility.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/utility.lua')
-rw-r--r--script/utility.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/utility.lua b/script/utility.lua
index f302e706..5a52e417 100644
--- a/script/utility.lua
+++ b/script/utility.lua
@@ -640,12 +640,12 @@ end
---@return string
function m.trim(str, mode)
if mode == "left" then
- return str:gsub('^%s+', '')
+ return (str:gsub('^%s+', ''))
end
if mode == "right" then
- return str:gsub('%s+$', '')
+ return (str:gsub('%s+$', ''))
end
- return str:match '^%s*(%S+)%s*$'
+ return (str:match '^%s*(.-)%s*$')
end
function m.expandPath(path)