Merge pull request #217 from mehalter/master

Fix _node_text
This commit is contained in:
Andy Massimino
2022-04-19 12:19:59 -04:00
committed by GitHub

View File

@@ -135,10 +135,7 @@ end
local function _node_text(node, bufnr)
local text = vim.treesitter.query.get_node_text(node, bufnr)
if type(text) == "table" then
text = text[1]
end
return text
return text:match("(%S+).*")
end
--- Fill in a match result based on a seed node