refactor: correctness fixes, API modernization, and cleanup
This commit is contained in:
@@ -70,7 +70,12 @@ function Content:add_with_treesitter(text, lang)
|
||||
return
|
||||
end
|
||||
|
||||
local tree = parser:parse()[1]
|
||||
local trees = parser:parse()
|
||||
if not trees then
|
||||
return
|
||||
end
|
||||
|
||||
local tree = trees[1]
|
||||
if not tree then
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user