mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 22:10:01 -04:00
tests: only compare indents not contents in indent tests
This commit is contained in:
parent
ca06ff0a61
commit
b9069a81b9
2 changed files with 2 additions and 2 deletions
|
|
@ -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*")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue