Content deleted Content added
Sophivorus (talk | contribs) Code refactoring. Group code specific to the English Wikipedia under an enwiki function. Create a "lead" function as the generic entry point for templates. Also create a "parseArgs" function to abstract some common code. |
Sophivorus (talk | contribs) Move brokenCategory functionality to the generic lead function |
||
Line 813:
end
return frame:preprocess(text)▼
if text == "" and d.brokenCategory and d.brokenCategory ~= "" and mw.title.getCurrentTitle().isContentPage then▼
return "[[Category:" .. d.brokenCategory .. "]]"▼
else▼
return frame:preprocess(text)▼
end▼
end
Line 825 ⟶ 821:
local pageNames = { args[1] }
local text = main(pageNames, args)
▲ if text == "" and d.brokenCategory and d.brokenCategory ~= "" and mw.title.getCurrentTitle().isContentPage then
▲ return frame:preprocess(text)
▲ return "[[Category:" .. d.brokenCategory .. "]]"
▲ else
▲ return frame:preprocess(text)
▲ end
end
|