mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
test/functional/helpers.lua: Fix dedent() #4735
The character class %s also matches a newline in lua, that's not really what we want here. It works in the other cases in this function, so I left them, but the final gsub should preserve newlines.
This commit is contained in:
parent
a524200ca7
commit
48b2faead8
@ -176,7 +176,7 @@ local function dedent(str)
|
||||
return str
|
||||
end
|
||||
-- create a pattern for the indent
|
||||
indent = indent:gsub('%s', '%%s')
|
||||
indent = indent:gsub('%s', '[ \t]')
|
||||
-- strip it from the first line
|
||||
str = str:gsub('^'..indent, '')
|
||||
-- strip it from the remaining lines
|
||||
|
Loading…
Reference in New Issue
Block a user