From 48b2faead8488e102f6d731f9d793aafc58dc537 Mon Sep 17 00:00:00 2001 From: KillTheMule Date: Tue, 10 May 2016 22:52:44 +0200 Subject: 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. --- test/functional/helpers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/helpers.lua') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 6ccadda72d..37b7bf664c 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -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 -- cgit