Cook containable
This commit is contained in:
@@ -10,6 +10,29 @@
|
|||||||
files:
|
files:
|
||||||
- '**/*.xml'
|
- '**/*.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
|
- name: excludeditems
|
||||||
regex: <Containable!any(\s?excludeditems="[^"]+")
|
regex: <Containable!any(\s?excludeditems="[^"]+")
|
||||||
lua: |
|
lua: |
|
||||||
|
Reference in New Issue
Block a user