Изменения
параметр comment, полезный для шаблонов стопка/таблица примеров
local link = yesno(args._link, false)
local link = yesno(args._link, false)
local endl = args._endl or ''
local endl = args._endl or ''
local pre_text = args['_pre-text'] or args._prefix or ''
local prefix = args._prefix or args['_pre-text'] or ''
local post_text = args['_post-text'] or args._postfix or ''
local postfix = args._postfix or args['_post-text'] or ''
local comment = args._comment or ''
local comment_sep = args._comment_sep or ' '
local nobr = yesno(args._nobr, false)
local nobr = yesno(args._nobr, false)
local spaced = yesno(args._spaced, false)
local spaced = yesno(args._spaced, false)
tag = 'tt'
tag = 'tt'
sep = '\n|'
sep = '\n|'
comment_sep = '\n|'
end
end
local nwt = tag and mw.html.create(tag):tag(tag) --"no-wiki tag", внутри него шаблон не вызывается
local nwt = tag and mw.html.create(tag):tag(tag) --"no-wiki tag", внутри него шаблон не вызывается
nwt:css('white-space', 'nowrap')
nwt:css('white-space', 'nowrap')
end
end
local content = nowiki(pre_text) .. '{{' --для накопления содержимого тэга
local content = nowiki(prefix) .. '{{' --для накопления содержимого тэга
local tname = args._template or args[1]
local tname = args._template or args[1]
if tname == nil then --если имя шаблона содержит знак "=" (работает, только если нет неименованных параметров)
if tname == nil then --если имя шаблона содержит знак "=" (работает, только если нет неименованных параметров)
end
end
end
end
content = content .. '}}' .. nowiki(post_text)
content = content .. '}}' .. nowiki(postfix)
if container then
if container then
local container_args = {}
local container_args = {}
end
end
return tostring(nwt) .. ' ' .. sep .. pre_text .. expand_result .. post_text
return tostring(nwt) .. ' ' .. sep .. prefix .. expand_result .. postfix .. comment_sep .. comment
end
end
return p
return p