We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f2d24ac + e451e0c commit 1cca23cCopy full SHA for 1cca23c
lua/nvim-ts-autotag/internal.lua
@@ -44,7 +44,13 @@ local function is_in_template_tag()
44
local has_template_string = false
45
46
local current_node = cursor_node
47
+ local visited_nodes = {}
48
while not (has_element and has_template_string) and current_node do
49
+ local node_id = current_node:id()
50
+ if visited_nodes[node_id] then
51
+ break
52
+ end
53
+ visited_nodes[node_id] = true
54
if not has_element and current_node:type() == "element" then
55
has_element = true
56
end
0 commit comments