Изменения
Перейти к навигации
Перейти к поиску
Строка 1:
Строка 1:
− +
Строка 24:
Строка 24:
− +
Строка 45:
Строка 45:
− +
− +
Модуль:Надстрочное предупреждение (посмотреть исходный код)
Версия от 03:51, 16 мая 2023
, 2 года назадfix
require( 'strict' );
require( 'strict' )
local p = {}
local p = {}
-- Форматирование выделяемого шаблоном текста
-- Форматирование выделяемого шаблоном текста
local function getSpanText( text, style )
local function getSpanText( text, style )
style = style or 'background:#ffeaea; color:#444444;';
style = style or 'background:#ffeaea; color:#444444;'
local tag = mw.html.create( 'span' )
local tag = mw.html.create( 'span' )
local function getLink( link, text, comment )
local function getLink( link, text, comment )
if not isEmpty( comment ) then
if not isEmpty( comment ) then
local delink = require( 'Module:Delink' )._delink;
local delink = require( 'Module:Delink' )._delink
comment = delink( { comment } )
comment = delink( { comment } )
if comment then
if comment then
local html = mw.html.create( 'span' )
local html = mw.html.create( 'span' )
:attr( 'style', 'border-bottom:1px dotted;' )
:attr( 'style', 'border-bottom:1px dotted;' )
:attr( 'title', delink( comment ) )
:attr( 'title', comment )
:wikitext( text )
:wikitext( text )