Изменения

м
Нет описания правки
Строка 3: Строка 3:  
local function isempty(s)
 
local function isempty(s)
 
   return s == nil or s == ''
 
   return s == nil or s == ''
end
  −
  −
function ctd.test( frame )
  −
local text = 'term = ' .. frame.args['term']
  −
    return text
  −
end
  −
  −
function ctd.test2( frame )
  −
    return 'it works'
   
end
 
end
   Строка 53: Строка 44:     
-- considering type of view
 
-- considering type of view
if view == 'подсказка' or view == 'сноска и подсказка' then
+
if view == 'подсказка' or view == 'сноска и подсказка' or view == 'подсказка и сноска' then
 
text = '{{#tag:span|' .. text .. '|style=border-bottom:1px dotted gray; cursor:help;|title=' .. description .. '(БТС, ' .. term .. ')}}'  
 
text = '{{#tag:span|' .. text .. '|style=border-bottom:1px dotted gray; cursor:help;|title=' .. description .. '(БТС, ' .. term .. ')}}'  
 
end
 
end
Строка 62: Строка 53:  
text = text .. ' [' .. description .. ']'
 
text = text .. ' [' .. description .. ']'
 
end
 
end
 +
 +
-- add debug information
 +
text = '<p>DEBUG: view ='.. view ..'; term = '.. term ..'; description = '.. description ..'; origin = '.. origin .. '</p>' .. text
 
 
     return text .. reference
+
     return text .. reference  
end
  −
 
  −
function ctd.test( frame )
  −
local text = 'term = ' .. frame.args['term']
  −
    return text
   
end
 
end
    
return ctd
 
return ctd