Изменения

создаем раздельные сообщения для раздела и статьи
Строка 225: Строка 225:  
self.issue = args.smalltext
 
self.issue = args.smalltext
 
else
 
else
local sect
+
if args.sect then
if args.sect == '' then
+
local issue_sect = args.issue_sect
sect = '<span style="font-weight:bold">Эта ' .. (cfg.sectionDefault or 'статья') .. '</span>'
+
issue_sect = type(issue_sect) == 'string' and issue_sect ~= '' and issue_sect or nil
elseif type(args.sect) == 'string' then
+
local issues = {}
sect = '<span style="font-weight:bold">' .. args.sect .. '</span>'
+
table.insert(issues, issue_sect)
 +
self.issue = table.concat(issues, ' ')
 +
else
 +
local issue = args.issue
 +
issue = type(issue) == 'string' and issue ~= '' and issue or nil
 +
local text = args.text
 +
text = type(text) == 'string' and text or nil
 +
local issues = {}
 +
table.insert(issues, issue)
 +
table.insert(issues, text)
 +
self.issue = table.concat(issues, ' ')
 
end
 
end
local issue = args.issue
  −
issue = type(issue) == 'string' and issue ~= '' and issue or nil
  −
local text = args.text
  −
text = type(text) == 'string' and text or nil
  −
local issues = {}
  −
table.insert(issues, sect)
  −
table.insert(issues, issue)
  −
table.insert(issues, text)
  −
self.issue = table.concat(issues, ' ')
   
end
 
end
  
Анонимный участник