Изменения

style 'pre' + opener '*' - _before = style '*pre'
Строка 63: Строка 63:  
if type(k) == 'number' then
 
if type(k) == 'number' then
 
i = i + 1
 
i = i + 1
 +
 
if v ~= '' then
 
if v ~= '' then
 
pre_targs = mw.text.split(v, '\\')
 
pre_targs = mw.text.split(v, '\\')
Строка 84: Строка 85:  
end
 
end
 
end
 
end
 +
 
table.insert(targs, 1, tname)
 
table.insert(targs, 1, tname)
targs._sep, targs._nobr, targs._nocat, targs._spaced, targs._comment_sep
+
targs._sep, targs._style, targs._nobr, targs._nocat, targs._spaced, targs._comment_sep
= sep, nobr, nocat, spaced, comment_sep
+
= sep, style, nobr, nocat, spaced, comment_sep
if not targs._style then
+
local adjusted_opener
 +
if style == 'pre' and opener == '*' and targs._before == nil then
 +
adjusted_opener = ''
 +
targs._style = '*pre'
 +
else
 +
adjusted_opener = opener
 +
end
 +
--[[if not targs._style then
 
targs._style = style
 
targs._style = style
end
+
end]]
content = content .. (i ~= 1 and between and between .. '\n' or '') .. opener .. tostring(expand(frame, 'пример', targs)) .. '\n'
+
 +
content = content .. (i ~= 1 and between and between .. '\n' or '') .. adjusted_opener .. tostring(expand(frame, 'пример', targs)) .. '\n'
 
end
 
end
 
end
 
end
Анонимный участник