Изменения

м
Нет описания правки
Строка 6: Строка 6:     
-- Split string 'inputstr' by separator 'sep' and return values in table
 
-- Split string 'inputstr' by separator 'sep' and return values in table
 +
-- Issue: do not insert nil value if in the middle; f.e.: текст@@выражение@
 
local function split_string(inputstr, sep)
 
local function split_string(inputstr, sep)
 
     if sep == nil then
 
     if sep == nil then
Строка 115: Строка 116:  
-- Where 'userparam' consist of all the parameters that can not be fetched by symantic property:
 
-- Where 'userparam' consist of all the parameters that can not be fetched by symantic property:
 
-- * text = text to show; generally it is the original text of request
 
-- * text = text to show; generally it is the original text of request
-- * view = style of displaying information
+
-- * view = style of displaying information: подсказка, сноска, скобки
 
-- * type = type of term: понятие (по умолчанию), личность, выражение, литература, периодика / conception, person, expression, literature, periodical
 
-- * type = type of term: понятие (по умолчанию), личность, выражение, литература, периодика / conception, person, expression, literature, periodical
 
-- * style= серый / gray
 
-- * style= серый / gray
Строка 167: Строка 168:  
-- style for expression: (lang. origin)
 
-- style for expression: (lang. origin)
 
-- all other types: (origin, lifetime)
 
-- all other types: (origin, lifetime)
if not isempty(frame.args['origin']) or not isempty(frame.args['lifetime']) then
+
if   not isempty(frame.args['origin'])  
 +
  or not isempty(frame.args['lifetime'])  
 +
  or not isempty(frame.args['language'])  then
 
origin = ' ('
 
origin = ' ('
 
if not isempty(frame.args['language']) then
 
if not isempty(frame.args['language']) then
Строка 209: Строка 212:     
-- DEBUG
 
-- DEBUG
--text = '- view ='.. view ..'\n- type ='.. term_type ..'\n- style ='.. tostring(style) ..'\n- text ='.. text ..'\n'
+
--text = '- view ='.. view ..'\n- type ='.. term_type ..'\n- style ='.. tostring(style) ..'\n- text ='.. text ..'\nOUTPUT: \n'
 
--return  text .. reference  
 
--return  text .. reference