Изменения
+стиль wikitable (тестирую на ш:атлас мира), +параметр _nobr
local pre_text = args['_pre-text'] or ''
local pre_text = args['_pre-text'] or ''
local post_text = args['_post-text'] or ''
local post_text = args['_post-text'] or ''
local nobr = args['_nobr'] or ''
local style = args._style or ''
local style = args._style or ''
if style == 'pre' then
if style == 'pre' then
container = '*pre'
container = '*pre'
sep = ''
sep = ''
elseif style == 'wikitable' then
tag = 'tt'
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", внутри него шаблон не вызывается
if nwt and nobr then
nwt:css('white-space', 'nowrap')
end
local content = nowiki(pre_text) .. '{{' --для накопления содержимого тэга
local content = nowiki(pre_text) .. '{{' --для накопления содержимого тэга
local tname = args._template or args[1]
local tname = args._template or args[1]