Изменения

Перейти к навигации Перейти к поиску
нет описания правки
Строка 50: Строка 50:  
end
 
end
 
 
local content = ''
+
local content, are_comments = '', false
if style == 'wikitable' then
  −
if not inthemiddle then
  −
content = '{| class="wikitable '
  −
if wide then
  −
content = content .. 'wide'
  −
end
  −
content = content .. '"\n! Код !! Результат'
  −
end
  −
content = content .. '\n'
  −
end
   
for k, v in pairs(args) do
 
for k, v in pairs(args) do
 
local pre_targs, targs = {}, {}
 
local pre_targs, targs = {}, {}
Строка 75: Строка 65:  
value = v2:sub(equals_pos+1)
 
value = v2:sub(equals_pos+1)
 
targs[param] = value
 
targs[param] = value
 +
if param == '_comment' then are_comments = true end
 
else
 
else
 
if v2:sub(1, 5) == '_' then
 
if v2:sub(1, 5) == '_' then
Строка 90: Строка 81:  
end
 
end
 
end
 
end
if style == 'wikitable' and not inthemiddle then
+
if style == 'wikitable' then
content = content .. '|}'
+
local table_content = ''
 +
if not inthemiddle then
 +
table_content = '{| class="wikitable '
 +
if wide then table_content = table_content .. 'wide' end
 +
table_content = table_content .. '"\n! Код !! Результат'
 +
if are_comments then table_content = table_content .. ' !! Комментарий' end
 +
end
 +
content = table_content .. '\n' .. content
 +
if not inthemiddle then
 +
content = content .. '|}'
 +
else
 +
content = content:sub(1, -2)
 +
end
 
else
 
else
 
content = content:sub(1, -2)
 
content = content:sub(1, -2)
Анонимный участник

Реклама:

Навигация