Изменения

м
пробел после разделителя не должен идти, когда разделитель - новая строка (иначе создаётся поле pre)
Строка 58: Строка 58:  
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 ''
Строка 85: Строка 85:  
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", внутри него шаблон не вызывается
Строка 149: Строка 149:  
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
Анонимный участник