mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
@@ -161,8 +161,7 @@ end
|
||||
--@returns String with whitespace removed from its beginning and end
|
||||
local function trim(s)
|
||||
assert(type(s) == 'string', 'Only strings can be trimmed')
|
||||
local result = s:gsub('^%s+', ''):gsub('%s+$', '')
|
||||
return result
|
||||
return s:match('^%s*(.*%S)') or ''
|
||||
end
|
||||
|
||||
local function __index(t, key)
|
||||
|
Reference in New Issue
Block a user