Модул:морфо/sources
Documentation for this module may be created at Модул:морфо/sources/doc
local export = {}
local u = require("Module:utils")
function export.process_sources(value, title)
skip_categories = false
if value == 'т' then
reference = '{{Тихонов}}'
elseif value == 'т2' or value == 'т-ся' then
if u.endswith(title, 'ся') then
reference = '{{Тихонов|' .. mw.ustring.sub(title, 1, -3) .. '(ся)}}'
else
reference = '{{Тихонов|2=(ся)}}'
end
elseif value == 'т-сь' then
if u.endswith(title, 'сь') then
reference = '{{Тихонов|' .. mw.ustring.sub(title, 1, -3) .. '(сь)}}'
else
reference = '{{Тихонов|2=(сь)}}'
end
elseif u.startswith(value, 'т:') then
reference = '{{Тихонов|' .. mw.ustring.sub(value, 3) .. '}}'
elseif u.contains({'т3'}, value) then
reference = '{{Тихонов-3}}'
elseif u.contains({'е'}, value) then
reference = '{{Ефремова}}'
skip_categories = true
elseif u.contains({'к', 'ке', 'к,е', 'к, е'}, value) then
reference = '{{Кузнецова и Ефремова}}'
skip_categories = true
elseif u.contains({'БУС'}, value) then
reference = '{{БУС|сокр=1}}'
else
-- reference = wu.span_red('(неизвестный источник)')
reference = ''
end
return reference, skip_categories
end
return export