Module:Format link: Difference between revisions

m
1 revision imported from wikipedia:Module:Format_link
m (1 revision imported from wikipedia:Module:Format_link)
m (1 revision imported from wikipedia:Module:Format_link)
 
(One intermediate revision by one other user not shown)
Line 168:
local title = nil
if parsed.page then title = mw.title.new(parsed.page) end
if title and (not title.isExternal) and (not title.exists) then
local success, exists = pcall(function() return title.exists end)
category = mw.ustring.format('[[Category:%s]]', catMissing)
if success and not exists then
category = mw.ustring.format('[[Category:%s]]', catMissing)
end
end
end