fix duplicate labels

This commit is contained in:
2025-10-13 00:57:43 +08:00
parent e604b13160
commit 7994b59938
2 changed files with 7 additions and 5 deletions

View File

@@ -135,7 +135,9 @@ local function collect_node(doc, l)
}
for _, t in ipairs(targets) do
if nodes[t] then
table.insert(blocks, nodes[t]:clone())
local cl = nodes[t]:clone()
cl.identifier = ""
table.insert(blocks, cl)
-- show("insert [" .. nodes[t].identifier .. ']\n')
else
io.stderr:write("Cannot find AST node with label " .. t .. "\n")