specns={file='file',image='file',category='cat',
['к']='cat',['категория']='cat',['файл']='file',['изображение']='file'}
linkprefs="http:// gopher:// https:// mailto: news:// ftp:// irc:// //"
local function Delink(text,repl,cat,file,href,colon)
return (
mw.ustring.gsub(text, "%[%[(%s*([^|%]]+)%s*)|?(.-)%]%](%a*)", function(a,l,c,e)
l = l:gsub("%s+"," ");
if specns[mw.ustring.lower(l):match("^(.*):")] then
if specns[mw.ustring.lower(l):match("^(.*):")]=='cat' then
if cat then