Content deleted Content added
|
|
end
return parentLogicStuff..testlogic
end
local function yn(x)
return x and x ~= ""
end
function p.avoidTemplateLoops(frame)
local args = frame.args
local title = args.title
local term = args.term
local plain = yn(args.plain)
local expand = yn(args.expand)
local titleObj = mw.title.new(title)
local content = titleObj:getContent()
if expand then
content = frame:preprocess(content)
end
local found = mw.ustring.find(content, term, 1, plain)
return yn(found) or ""
end
|