Cook containable
This commit is contained in:
@@ -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="[^"]+")
|
||||
|
Reference in New Issue
Block a user