Изменения
Модуль:Надстрочное предупреждение (посмотреть исходный код)
Версия от 17:50, 16 мая 2023
, 2 года назадуточнение исходного поведения: выделение при наличии кастомных комментариев
-- Форматирование ссылок как в шаблоне
-- Форматирование ссылок как в шаблоне
local function getLink( link, text, comment )
local function getLink( link, text, comment, hasComment )
if not isEmpty( comment ) then
if not isEmpty( comment ) then
local delink = require( 'Module:Delink' )._delink
local delink = require( 'Module:Delink' )._delink
if comment then
if comment then
local html = mw.html.create( 'span' )
local html = mw.html.create( 'span' )
:attr( 'title', comment )
:attr( 'title', comment )
:wikitext( text )
:wikitext( text )
if hasComment then
html:attr( 'style', 'border-bottom:1px dotted;' )
end
text = tostring( html )
text = tostring( html )
tag
tag
:wikitext( '[' ) -- [
:wikitext( '[' ) -- [
:wikitext( getLink( args.link, args.text, comment ) )
:wikitext( getLink( args.link, args.text, comment, isEmpty( args.comment ) ) )
:wikitext( getTalkLink( args.talk, args.noprint ) )
:wikitext( getTalkLink( args.talk, args.noprint ) )
:wikitext( ']' ) -- ]
:wikitext( ']' ) -- ]