localp={}functionp.main(frame)returnp._main(frame.args[1])endfunctionp._main(searchString)localcontent=mw.title.getCurrentTitle():getContent()localoffset=string.find(content,"==",1,true)ifoffsetthenlocallead=string.sub(content,1,offset-1)if(string.find(lead,searchString))thenlead=lead:gsub("{{%s-[Ii]nfobox%s-mapframe","")--don't check for infobox mapframe:gsub("{{%s-[Ii]nfobo[^}]-%|%s-embed%s-=%s-yes","")--don't check for embeded infoboxes:gsub("{{%s-[Ii]nfobo[^}]-%|%s-child%s-=%s-yes","")--don't check for child infoboxeslocaliter=string.gmatch(lead,"{{%s-[Ii]nfobox")iter()ifnotiter()then--if able to find two infoboxes in the lead, then don't return truelocaliter2=string.gmatch(content,searchString)iter2()ifnotiter2()then--if able to find two of the specific infobox in the article, then don't return truereturntrueendendendendendreturnp