Изменения

параметр between
Строка 40: Строка 40:  
local spaced = args.spaced or args._spaced
 
local spaced = args.spaced or args._spaced
 
local comment_sep = args.comment_sep or args._comment_sep
 
local comment_sep = args.comment_sep or args._comment_sep
 +
local between = args.between or args._between
 
local inthemiddle = yesno(args.inthemiddle or args._inthemiddle, false)
 
local inthemiddle = yesno(args.inthemiddle or args._inthemiddle, false)
 
local wide = yesno(args.wide or args._wide, false)
 
local wide = yesno(args.wide or args._wide, false)
Строка 54: Строка 55:  
end
 
end
 
 
local content, are_comments = '', false
+
local content, are_comments, i = '', false, 0
 
for k, v in pairs(args) do
 
for k, v in pairs(args) do
 
local pre_targs, targs = {}, {}
 
local pre_targs, targs = {}, {}
 
if type(k) == 'number' then
 
if type(k) == 'number' then
 +
i = i + 1
 
if v ~= '' then
 
if v ~= '' then
 
pre_targs = mw.text.split(v, '\\')
 
pre_targs = mw.text.split(v, '\\')
Строка 82: Строка 84:  
targs._sep, targs._style, targs._nobr, targs._nocat, targs._spaced, targs._comment_sep
 
targs._sep, targs._style, targs._nobr, targs._nocat, targs._spaced, targs._comment_sep
 
= sep, style, nobr, nocat, spaced, comment_sep
 
= sep, style, nobr, nocat, spaced, comment_sep
content = content .. opener .. tostring(expand(frame, 'пример', targs)) .. '\n'
+
content = content .. (i ~= 1 and between or '') .. opener .. tostring(expand(frame, 'пример', targs)) .. '\n'
 
end
 
end
 
end
 
end
Анонимный участник