Изменения
мСтрока 58:
Строка 58:
− +
Строка 85:
Строка 85:
− +
Строка 149:
Строка 149:
− +
пробел после разделителя не должен идти, когда разделитель - новая строка (иначе создаётся поле pre)
local tag = args._tag or 'code'
local tag = args._tag or 'code'
local container = args._container or nil
local container = args._container or nil
local sep = args._sep or '→' -- по умолчанию "→"
local sep = args._sep and args._sep .. ' ' or '→ ' -- по умолчанию "→"
local link = yesorno(args._link, false)
local link = yesorno(args._link, false)
local endl = args._endl or ''
local endl = args._endl or ''
elseif style == 'wikitable' then
elseif style == 'wikitable' then
tag = 'tt'
tag = 'tt'
sep = '\n|'
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", внутри него шаблон не вызывается
end
end
return tostring(nwt) .. ' ' .. sep .. ' ' .. pre_text .. tostring(expand(frame, tname, targs)) .. post_text
return tostring(nwt) .. ' ' .. sep .. pre_text .. tostring(expand(frame, tname, targs)) .. post_text
end
end
return p
return p