tests: only compare indents not contents in indent tests

This commit is contained in:
Stephan Seitz 2022-02-04 23:36:36 +01:00
parent ca06ff0a61
commit b9069a81b9
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ local function same_indent(state, arguments)
local ok = true
local errors = { before = {}, after = {} }
for line = 1, #before do
if before[line] ~= after[line] then
if #string.match(before[line], "^%s*") ~= #string.match(after[line], "^%s*") then
if before[line] and after[line] then
-- store the actual indentation length for each line
errors.before[line] = #string.match(before[line], "^%s*")