Изменения

Перейти к навигации Перейти к поиску
корректная обработка комментариев
Строка 44: Строка 44:  
-- Форматирование ссылок как в шаблоне
 
-- Форматирование ссылок как в шаблоне
 
local function getLink( link, text, comment )
 
local function getLink( link, text, comment )
if comment then
+
if not isEmpty( comment ) then
 
local delink = require( 'Module:Delink' )._delink;
 
local delink = require( 'Module:Delink' )._delink;
local tag = mw.html.create( 'span' )
+
comment = delink( { comment } )
:attr( 'style', 'border-bottom:1px dotted;' )
+
if comment then
:attr( 'title', delink( comment ) )
+
local html = mw.html.create( 'span' )
:wikitext( text )
+
:attr( 'style', 'border-bottom:1px dotted;' )
 +
:attr( 'title', delink( comment ) )
 +
:wikitext( text )
 
 
text = tostring( tag )
+
text = tostring( html )
 +
end
 
end
 
end
 
 
Анонимный участник

Реклама:

Навигация