fix: more reliable remove_indentation (#2102)
This commit is contained in:
@@ -576,7 +576,7 @@ end
|
|||||||
--- remove indentation from code: spaces or tabs
|
--- remove indentation from code: spaces or tabs
|
||||||
function M.remove_indentation(code)
|
function M.remove_indentation(code)
|
||||||
if not code then return code end
|
if not code then return code end
|
||||||
return code:gsub("^%s*", "")
|
return code:gsub("^%s*", ""):gsub("%s*$", "")
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.relative_path(absolute)
|
function M.relative_path(absolute)
|
||||||
|
|||||||
Reference in New Issue
Block a user