summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/duplicate-doc-alias.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/diagnostics/duplicate-doc-alias.lua')
-rw-r--r--script/core/diagnostics/duplicate-doc-alias.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/core/diagnostics/duplicate-doc-alias.lua b/script/core/diagnostics/duplicate-doc-alias.lua
index 360358e4..6d8593ca 100644
--- a/script/core/diagnostics/duplicate-doc-alias.lua
+++ b/script/core/diagnostics/duplicate-doc-alias.lua
@@ -15,6 +15,7 @@ return function (uri, callback)
return
end
+ local merged = {}
local cache = {}
for _, doc in ipairs(state.ast.docs) do
if doc.type == 'doc.alias'
@@ -36,10 +37,11 @@ return function (uri, callback)
finish = otherDoc.finish,
uri = guide.getUri(otherDoc),
}
+ merged[name] = merged[name] or vm.docHasAttr(otherDoc, 'merge')
end
end
end
- if #cache[name] > 1 then
+ if not merged[name] and #cache[name] > 1 then
callback {
start = (doc.alias or doc.enum).start,
finish = (doc.alias or doc.enum).finish,