Cook containable

This commit is contained in:
2025-03-28 13:02:09 +01:00
parent 5c8e4cf410
commit 1a4c84459f

View File

@@ -9,6 +9,29 @@
end
files:
- '**/*.xml'
- name: containerscontainable
regex: Containable!anyitems="([^"]+)"
lua: |
local gurantee = {"smallitem", "mediumitem", "largeitem"}
local has = {}
local items = strsplit(s1, ",")
for i, item in pairs(items) do
for _, g in pairs(gurantee) do
if string.find(item, g) then
has[g] = true
end
end
end
for _, g in pairs(gurantee) do
if not has[g] then
s1 = s1 .. "," .. g
end
end
files:
- '**/*.xml'
- name: excludeditems
regex: <Containable!any(\s?excludeditems="[^"]+")