Модуль:DocTools: различия между версиями
Перейти к навигации
Перейти к поиску
StasR (обсуждение | вклад) Нет описания правки |
StasR (обсуждение | вклад) Нет описания правки |
||
Строка 16: | Строка 16: | ||
end | end | ||
if comment then | if comment then | ||
comment = '< | comment = '<div class="nkvd-doc-comment">' | ||
.. tools.phrase( comment ) .. '</ | .. tools.phrase( comment ) .. '</div>' | ||
end | end | ||
return (reference or '') .. '</p>' .. (comment or '') | return (reference or '') .. '</p>' .. (comment or '') |
Версия от 20:01, 25 декабря 2016
Для документации этого модуля может быть создана страница Модуль:DocTools/doc
local doctools = {}
function doctools.endRecord( args )
local reference = args['сноска']
if reference then
reference = mw.getCurrentFrame():extensionTag{ name ='ref', content = tools.phrase( reference ) }
end
local comment = args['комментарий']
local canceledBy = args['отмена']
if canceledBy then
if mw.ustring.sub( canceledBy, 1, 9 ) == 'Документ:' then
canceledBy = mw.ustring.sub( canceledBy, 10, -1 )
end
comment = '<b>Отменено:</b> [[Документ:' .. canceledBy .. '|'
.. canceledBy .. ']]. ' .. (comment or '')
end
if comment then
comment = '<div class="nkvd-doc-comment">'
.. tools.phrase( comment ) .. '</div>'
end
return (reference or '') .. '</p>' .. (comment or '')
end
return doctools