<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://en.enduro.team/index.php?action=history&amp;feed=atom&amp;title=Module%3ASources</id>
		<title>Module:Sources - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://en.enduro.team/index.php?action=history&amp;feed=atom&amp;title=Module%3ASources"/>
		<link rel="alternate" type="text/html" href="https://en.enduro.team/index.php?title=Module:Sources&amp;action=history"/>
		<updated>2026-06-11T08:56:34Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://en.enduro.team/index.php?title=Module:Sources&amp;diff=6891&amp;oldid=prev</id>
		<title>Alexander: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="https://en.enduro.team/index.php?title=Module:Sources&amp;diff=6891&amp;oldid=prev"/>
				<updated>2019-01-31T08:18:03Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:18, 31 January 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Alexander</name></author>	</entry>

	<entry>
		<id>https://en.enduro.team/index.php?title=Module:Sources&amp;diff=6890&amp;oldid=prev</id>
		<title>Vlsergey at 09:01, 4 June 2018</title>
		<link rel="alternate" type="text/html" href="https://en.enduro.team/index.php?title=Module:Sources&amp;diff=6890&amp;oldid=prev"/>
				<updated>2018-06-04T09:01:12Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {};&lt;br /&gt;
local u = require('Module:Sources-utils')&lt;br /&gt;
&lt;br /&gt;
local i18nDefaultLanguage = 'ru';&lt;br /&gt;
&lt;br /&gt;
local i18nEtAlDefault = ' et al.';&lt;br /&gt;
local i18nEtAl = {&lt;br /&gt;
	ru	= ' и др.',&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local i18nEditors = {&lt;br /&gt;
	fr	= '',&lt;br /&gt;
	de	= 'Hrsg.: ',&lt;br /&gt;
	es	= '',&lt;br /&gt;
	en	= '',&lt;br /&gt;
	it	= '',&lt;br /&gt;
	ru	= 'под ред. ',&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local i18nVolume = {&lt;br /&gt;
    de  = 'Vol.',&lt;br /&gt;
	fr	= 'Vol.',&lt;br /&gt;
	es	= 'Vol.',&lt;br /&gt;
	en	= 'Vol.',&lt;br /&gt;
	it	= 'Vol.',&lt;br /&gt;
	ru	= 'Т.',&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local i18nIssue = {&lt;br /&gt;
	en	= 'Iss.',&lt;br /&gt;
	ru	= 'вып.',&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local i18nPages = {&lt;br /&gt;
	fr = 'P.',&lt;br /&gt;
	de = 'S.',&lt;br /&gt;
	es = 'P.',&lt;br /&gt;
	en = 'P.',&lt;br /&gt;
	it = 'P.',&lt;br /&gt;
	ru = 'С.',&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local i18nNumberOfPages = {&lt;br /&gt;
	en = 'p.',&lt;br /&gt;
	ru = 'с.',&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local i18nTirage = {&lt;br /&gt;
	en	= 'ed. size: %d',&lt;br /&gt;
	ru	= '%d экз.',&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local monthg = {'января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', &amp;quot;сентября&amp;quot;, &amp;quot;октября&amp;quot;, &amp;quot;ноября&amp;quot;, &amp;quot;декабря&amp;quot;};&lt;br /&gt;
&lt;br /&gt;
local PREFIX_CITEREF = &amp;quot;CITEREF_&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
local options_commas = { separator = ', ', conjunction = ', ', format = function( src ) return src end, nolinks = false, preferids = false };&lt;br /&gt;
local options_commas_short = { separator = ', ', conjunction = ', ', format = function( src ) return src end, nolinks = false, preferids = false, short = true };&lt;br /&gt;
local options_commas_nolinks = { separator = ', ', conjunction = ', ', format = function( src ) return src end, nolinks = true, preferids = false };&lt;br /&gt;
local options_commas_it = { separator = ', ', conjunction = ', ', format = function( src ) return &amp;quot;''&amp;quot; .. src .. &amp;quot;''&amp;quot; end, nolinks = false, preferids = false };&lt;br /&gt;
local options_commas_it_short = { separator = ', ', conjunction = ', ', format = function( src ) return &amp;quot;''&amp;quot; .. src .. &amp;quot;''&amp;quot; end, nolinks = false, preferids = false, short = true };&lt;br /&gt;
local options_commas_it_nolinks = { separator = ', ', conjunction = ', ', format = function( src ) return &amp;quot;''&amp;quot; .. src .. &amp;quot;''&amp;quot; end, nolinks = true , preferids = false };&lt;br /&gt;
local options_citetypes = { separator = ' ', conjunction = ' ', format = function( src ) return 'citetype_' .. src end, nolinks = true , preferids = true };&lt;br /&gt;
&lt;br /&gt;
local options_commas_authors = { separator = ', ', conjunction = ', ', format = personNameToAuthorName, nolinks = false, preferids = false };&lt;br /&gt;
local options_commas_responsible = { separator = ', ', conjunction = ', ', format = personNameToResponsibleName, nolinks = false, preferids = false };&lt;br /&gt;
&lt;br /&gt;
local options_arxiv = { separator = '; ', conjunction = '; ', format = function( id ) return '[http://arxiv.org/abs/' .. id .. ' arXiv:' .. id .. ']' end, nolinks = true, preferids = false };&lt;br /&gt;
local options_doi = { separator = '; ', conjunction = '; ', format = function( doi ) return '[http://dx.doi.org/' .. doi .. ' doi:' .. doi .. ']' end, nolinks = true, preferids = false };&lt;br /&gt;
local options_issn = { separator = '; ', conjunction = '; ', format = function( issn ) return '[https://www.worldcat.org/issn/' .. issn .. ' ' .. issn .. ']' end, nolinks = true, preferids = false };&lt;br /&gt;
local options_pmid = { separator = '; ', conjunction = '; ', format = function( pmid ) return '[https://www.ncbi.nlm.nih.gov/pubmed/?term=' .. pmid .. ' PMID:' .. pmid .. ']' end, nolinks = true, preferids = false };&lt;br /&gt;
&lt;br /&gt;
function renderSource( context, src )&lt;br /&gt;
	options_commas_authors.format = personNameToAuthorName;&lt;br /&gt;
	options_commas_responsible.format = personNameToResponsibleName;&lt;br /&gt;
&lt;br /&gt;
	context.lang = getLangCode( getSingle( src.lang ) ) or i18nDefaultLanguage;&lt;br /&gt;
&lt;br /&gt;
	preprocessPlaces( src, context.lang );&lt;br /&gt;
&lt;br /&gt;
	src.title = src.title or getSingle( src.url ) or '\'\'(unspecified title)\'\''&lt;br /&gt;
&lt;br /&gt;
	if ( src.sourceId and not src.url ) then&lt;br /&gt;
		local entity = getEntity( context, src.sourceId );&lt;br /&gt;
		if ( entity.sitelinks and entity.sitelinks[ context.lang .. 'wikisource'] ) then&lt;br /&gt;
			src.url = ':' .. context.lang .. ':s:' .. entity.sitelinks[ context.lang .. 'wikisource' ].title;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( not src.year and src.dateOfPublication ) then&lt;br /&gt;
		local date = getSingle( src.dateOfPublication );&lt;br /&gt;
		src.year = mw.ustring.sub( date, 2, 5 );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( not src.year and src.dateOfCreation ) then&lt;br /&gt;
		local date = getSingle( src.dateOfCreation );&lt;br /&gt;
		src.year = mw.ustring.sub( date, 2, 5 );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local result;&lt;br /&gt;
	if ( src.author ) then&lt;br /&gt;
		result = getPeopleAsWikitext( context, src.author, options_commas_authors );&lt;br /&gt;
	end&lt;br /&gt;
	if ( not isEmpty( result )) then&lt;br /&gt;
		result = '&amp;lt;i class=&amp;quot;wef_low_priority_links&amp;quot;&amp;gt;' .. result .. '&amp;lt;/i&amp;gt; ';&lt;br /&gt;
	else&lt;br /&gt;
		result = '';&lt;br /&gt;
	end&lt;br /&gt;
 &lt;br /&gt;
 	if ( src.part ) then&lt;br /&gt;
 		if ( src.url ) then&lt;br /&gt;
			result = result .. wrapInUrl( src.url, toString( context, src.part, options_commas_nolinks ) );&lt;br /&gt;
		else&lt;br /&gt;
			result = result .. toString( context, src.part, options_commas );&lt;br /&gt;
		end&lt;br /&gt;
		result = result .. ' // ' .. toString( context, src.title, options_commas );&lt;br /&gt;
	else&lt;br /&gt;
		-- title only&lt;br /&gt;
 		if ( src.url ) then&lt;br /&gt;
			result = result .. wrapInUrl( src.url, toString( context, src.title, options_commas_nolinks ) );&lt;br /&gt;
		else&lt;br /&gt;
			result = result .. toString( context, src.title, options_commas );&lt;br /&gt;
		end&lt;br /&gt;
 	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.subtitle ) then&lt;br /&gt;
		result = result .. &amp;quot;: &amp;quot; .. toString( context, src.subtitle, options_commas );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.originaltitle ) then&lt;br /&gt;
		result = result .. ' = ' .. toString( context, src.originaltitle, options_commas );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.publication ) then&lt;br /&gt;
		if ( type( src.publication.title or '') ~= 'string' ) then error('type of src.publication.title is not string but ' .. type( src.publication.title ) ) end;&lt;br /&gt;
&lt;br /&gt;
		result = result .. ' // ' .. toString( context, src.publication, options_commas_it_short );&lt;br /&gt;
		if ( src.publication.subtitle ) then&lt;br /&gt;
			result = result .. ': ' .. toString( context, src.publication.subtitle, options_commas_it_short );&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	result = result .. '&amp;lt;span class=&amp;quot;wef_low_priority_links&amp;quot;&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
	if ( src.editor ) then&lt;br /&gt;
		local prefix = i18nEditors[ context.lang ] or i18nEditors[ i18nDefaultLanguage ];&lt;br /&gt;
		result = result .. ' / ' .. prefix .. getPeopleAsWikitext( context, src.editor, options_commas_responsible );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.edition ) then&lt;br /&gt;
		result = result .. ' — ' .. toString( context, src.edition, options_commas );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.place or src.publisher or src.year ) then&lt;br /&gt;
		result = result .. ' — ';&lt;br /&gt;
		if ( src.place ) then&lt;br /&gt;
			result = result .. toString( context, src.place, options_commas_short );&lt;br /&gt;
			if ( src.publisher or src.year ) then&lt;br /&gt;
				result = result .. ': ';&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if ( src.publisher ) then&lt;br /&gt;
			result = result .. toString( context, src.publisher, options_commas_short );&lt;br /&gt;
			if ( src.year ) then&lt;br /&gt;
				result = result .. ', ';&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if ( src.year ) then&lt;br /&gt;
			result = result .. toString( context, src.year, options_commas );&lt;br /&gt;
		end&lt;br /&gt;
		result = result .. '.';&lt;br /&gt;
	end&lt;br /&gt;
 &lt;br /&gt;
 	if ( src.volume or src.issue ) then&lt;br /&gt;
 		result = result .. ' — ';&lt;br /&gt;
		if ( src.volume ) then&lt;br /&gt;
			local letter = i18nVolume[ context.lang ] or i18nVolume[ i18nDefaultLanguage ];&lt;br /&gt;
			result = result .. letter .. '&amp;amp;nbsp;' .. toString( context, src.volume, options_commas );&lt;br /&gt;
			if ( src.issue ) then&lt;br /&gt;
				local letter = i18nIssue[ context.lang ] or i18nIssue[ i18nDefaultLanguage ];&lt;br /&gt;
				result = result .. ', ' .. letter .. '&amp;amp;nbsp;' .. toString( context, src.issue, options_commas ) .. '.';&lt;br /&gt;
			else&lt;br /&gt;
				result = result .. '.';&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			local letter = i18nIssue[ context.lang ] or i18nIssue[ i18nDefaultLanguage ];&lt;br /&gt;
			result = result .. letter .. '&amp;amp;nbsp;' .. toString( context, src.issue, options_commas ) .. '.';&lt;br /&gt;
		end&lt;br /&gt;
 	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.pages ) then&lt;br /&gt;
		local letter = i18nPages[ context.lang ] or i18nPages[ i18nDefaultLanguage ];&lt;br /&gt;
		local strPages = toString( context, src.pages, options_commas );&lt;br /&gt;
		strPages = mw.ustring.gsub( strPages, '[-—]', '–' );&lt;br /&gt;
		result = result .. ' — ' .. letter .. '&amp;amp;nbsp;' .. strPages .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.numberOfPages ) then&lt;br /&gt;
		local letter = i18nNumberOfPages[ context.lang ] or i18nNumberOfPages[ i18nDefaultLanguage ];&lt;br /&gt;
		result = result .. ' — ' .. toString( context, src.numberOfPages, options_commas ) .. '&amp;amp;nbsp;' .. letter;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.bookSeries ) then&lt;br /&gt;
		result = result .. ' — (' .. toString( context, src.bookSeries, options_commas )&lt;br /&gt;
&lt;br /&gt;
	 	if ( src.bookSeriesVolume or src.bookSeriesIssue ) then&lt;br /&gt;
	 		result = result .. '; ';&lt;br /&gt;
			if ( src.bookSeriesVolume ) then&lt;br /&gt;
				local letter = i18nVolume[ context.lang ] or i18nVolume[ i18nDefaultLanguage ];&lt;br /&gt;
				result = result .. letter .. '&amp;amp;nbsp;' .. toString( context, src.bookSeriesVolume, options_commas );&lt;br /&gt;
				if ( src.bookSeriesIssue ) then&lt;br /&gt;
					local letter = i18nIssue[ context.lang ] or i18nIssue[ i18nDefaultLanguage ];&lt;br /&gt;
					result = result .. ', ' .. letter .. '&amp;amp;nbsp;' .. toString( context, src.bookSeriesIssue, options_commas );&lt;br /&gt;
				else&lt;br /&gt;
					result = result;&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				local letter = i18nIssue[ context.lang ] or i18nIssue[ i18nDefaultLanguage ];&lt;br /&gt;
				result = result .. letter .. '&amp;amp;nbsp;' .. toString( context, src.bookSeriesIssue, options_commas );&lt;br /&gt;
			end&lt;br /&gt;
	 	end&lt;br /&gt;
&lt;br /&gt;
		result = result .. ')';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.tirage ) then&lt;br /&gt;
		local tirageTemplate = i18nTirage[ context.lang ] or i18nTirage[ i18nDefaultLanguage ];&lt;br /&gt;
		result = result .. ' — ' .. toString( context, src.tirage, { separator = '; ', conjunction = ';', format = function( data ) return mw.ustring.format(tirageTemplate, data) end } );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.isbn ) then&lt;br /&gt;
		result = result .. ' — ISBN ' .. toString( context, src.isbn, options_commas );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.issn ) then&lt;br /&gt;
		result = result .. ' — ISSN ' .. toString( context, src.issn, options_issn );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.doi ) then&lt;br /&gt;
		result = result .. ' — ' .. toString( context, src.doi, options_doi );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.pmid ) then&lt;br /&gt;
		result = result .. ' — ' .. toString( context, src.pmid, options_pmid );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.arxiv ) then&lt;br /&gt;
		result = result .. ' — ' .. toString( context, src.arxiv, options_arxiv );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.sourceId ) then&lt;br /&gt;
		if ( src.type and src.sourceId ) then&lt;br /&gt;
			-- wrap into span to target from JS&lt;br /&gt;
			result = '&amp;lt;span class=&amp;quot;wikidata_cite ' .. toString( context, src.type, options_citetypes ) .. '&amp;quot; data-entity-id=&amp;quot;' .. getSingle( src.sourceId ) .. '&amp;quot;&amp;gt;' .. result .. '&amp;lt;/span&amp;gt;'&lt;br /&gt;
		else&lt;br /&gt;
			result = '&amp;lt;span class=&amp;quot;wikidata_cite citetype_unknown&amp;quot; data-entity-id=&amp;quot;' .. getSingle( src.sourceId ) .. '&amp;quot;&amp;gt;' .. result .. '&amp;lt;/span&amp;gt;'&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.accessdate ) then&lt;br /&gt;
			local date = getSingle( src.accessdate );&lt;br /&gt;
			local pattern = &amp;quot;(%-?%d+)%-(%d+)%-(%d+)T&amp;quot;;&lt;br /&gt;
			local y, m, d = mw.ustring.match( date , pattern );&lt;br /&gt;
			y,m,d = tonumber(y),tonumber(m),tonumber(d);&lt;br /&gt;
			result = result .. &amp;quot; &amp;lt;small&amp;gt;Проверено &amp;quot; .. tostring(d) .. &amp;quot; &amp;quot; .. monthg[m]  .. &amp;quot; &amp;quot; .. tostring(y) .. &amp;quot;.&amp;lt;/small&amp;gt;&amp;quot;;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	result = result .. '&amp;lt;/span&amp;gt;';&lt;br /&gt;
&lt;br /&gt;
    -- append invisible links to all elements used by source for tracking purposes&lt;br /&gt;
    local result = result .. '&amp;lt;div style=&amp;quot;display:none&amp;quot;&amp;gt;';&lt;br /&gt;
	for key, entity in pairs( context.cache ) do&lt;br /&gt;
		result = result .. '&amp;lt;a href=&amp;quot;https://wikidata.org' ..  mw.uri.localUrl('Track:' .. key).path .. '&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;';&lt;br /&gt;
	end&lt;br /&gt;
    result = result ..'&amp;lt;/div&amp;gt;'&lt;br /&gt;
&lt;br /&gt;
	return {text = result, code = src.code};&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function renderShortReference( src )&lt;br /&gt;
	context = {&lt;br /&gt;
		cache = {},&lt;br /&gt;
		lang = getSingle( src.lang ) or i18nDefaultLanguage;&lt;br /&gt;
	};&lt;br /&gt;
	src.title = src.title or '\'\'(unspecified title)\'\''&lt;br /&gt;
&lt;br /&gt;
	local result = '[[#' .. PREFIX_CITEREF .. src.code .. '|';&lt;br /&gt;
	if ( src.author ) then&lt;br /&gt;
		result = result .. toString( context, src.author, options_authors_nolinks );&lt;br /&gt;
	else&lt;br /&gt;
		result = result .. toString( context, src.title, options_commas_it_nolinks );&lt;br /&gt;
	end&lt;br /&gt;
	result = result .. ']]'&lt;br /&gt;
&lt;br /&gt;
	if ( src.year ) then&lt;br /&gt;
		result = result .. ', ' .. toString( context, src.year, options_commas );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.volume ) then&lt;br /&gt;
		local letter = i18nVolume[ context.lang ] or i18nVolume[ i18nDefaultLanguage ];&lt;br /&gt;
		result = result .. ' — ' .. letter .. '&amp;amp;nbsp;' .. toString( context, src.volume, options_commas ) .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( src.issue ) then&lt;br /&gt;
		local letter = i18nIssue[ context.lang ] or i18nIssue[ i18nDefaultLanguage ];&lt;br /&gt;
		result = result .. ' — ' .. letter .. '&amp;amp;nbsp;' .. toString( context, src.issue, options_commas ) .. '.';&lt;br /&gt;
	end&lt;br /&gt;
 &lt;br /&gt;
	if ( src.pages ) then&lt;br /&gt;
		local letter = i18nPages[ context.lang ] or i18nPages[ i18nDefaultLanguage ];&lt;br /&gt;
		result = result .. ' — ' .. letter .. '&amp;amp;nbsp;' .. toString( context, src.pages, options_commas )  .. '.';&lt;br /&gt;
	end&lt;br /&gt;
 &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getPeopleAsWikitext( context, value, options )&lt;br /&gt;
	if ( type( value ) == 'string' ) then&lt;br /&gt;
		return options.format( value );&lt;br /&gt;
	elseif ( type( value ) == 'table' ) then&lt;br /&gt;
		if ( value.id ) then&lt;br /&gt;
			-- this is link&lt;br /&gt;
			if ( options.preferids ) then&lt;br /&gt;
				return value.id;&lt;br /&gt;
			else&lt;br /&gt;
				if ( options.nolinks ) then&lt;br /&gt;
					return getPersonNameAsLabel( context, value.id, value.label, options );&lt;br /&gt;
				else&lt;br /&gt;
					return getPersonNameAsWikitext( context, value.id, value.label, options );&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		local resultList = {};&lt;br /&gt;
		for i, tableValue in pairs( value ) do&lt;br /&gt;
			local nextWikitext = getPeopleAsWikitext( context, tableValue, options );&lt;br /&gt;
			if ( not isEmpty( nextWikitext ) ) then&lt;br /&gt;
				table.insert( resultList, nextWikitext );&lt;br /&gt;
				if ( #resultList == 4 ) then&lt;br /&gt;
					-- even 4 is too much, but we preserve 4th to mark that &amp;quot;it's more than 3&amp;quot;&lt;br /&gt;
					break;&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		local resultWikitext = '';&lt;br /&gt;
		for i, wikitext in pairs( resultList ) do&lt;br /&gt;
			if ( i == 4 ) then&lt;br /&gt;
				resultWikitext = resultWikitext .. ( i18nEtAl[ context.lang ] or i18nEtAlDefault );&lt;br /&gt;
				break;&lt;br /&gt;
			end&lt;br /&gt;
			if ( i ~= 1 ) then&lt;br /&gt;
				resultWikitext = resultWikitext .. ', ';&lt;br /&gt;
			end&lt;br /&gt;
			resultWikitext = resultWikitext .. wikitext;&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		return resultWikitext;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return options.format( '(unknown type)' );&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getPersonNameAsWikitext( context, entityId, customLabel, options )&lt;br /&gt;
	local personName = getPersonNameAsLabel( context, entityId, customLabel, options);&lt;br /&gt;
	if ( personName == nil ) then&lt;br /&gt;
		return nil;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local link = getElementLink( context, entityId, nil );&lt;br /&gt;
	return wrapInUrl( link, personName );&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getPersonNameAsLabel( context, entityId, providedLabel, options )&lt;br /&gt;
	-- would custom label provided we don't need to check entity at all&lt;br /&gt;
	if ( not isEmpty( providedLabel ) ) then&lt;br /&gt;
		mw.log( 'Custom label provided for ' .. entityId );&lt;br /&gt;
		return options.format( providedLabel );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local entity = getEntity( context, entityId );&lt;br /&gt;
	if ( not entity ) then return '\'\'(entity ' .. entityId .. ' is missing)\'\'' end;&lt;br /&gt;
&lt;br /&gt;
	local personName = nil;&lt;br /&gt;
	-- support only labels so far&lt;br /&gt;
	if ( entity.labels[ context.lang ] ) then&lt;br /&gt;
		personName = entity.labels[ context.lang ].value;&lt;br /&gt;
		mw.log('Got person name of ' .. entityId .. ' from label: «' .. personName .. '»' )&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( not isInstanceOf( entity, 'Q5' ) ) then&lt;br /&gt;
		mw.log( 'Entity ' .. entityId .. ' is not a person' );&lt;br /&gt;
		return personName;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( isEmpty( personName ) ) then&lt;br /&gt;
		return '\'\'(not translated to ' .. context.lang .. ')\'\'';&lt;br /&gt;
	else&lt;br /&gt;
		return options.format( personName );&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function personNameToAuthorName( fullName )&lt;br /&gt;
	if ( not fullName ) then return fullName; end&lt;br /&gt;
&lt;br /&gt;
	local f, i, o = mw.ustring.match( fullName, '^%s*(%a[%a\-]*)\,%s(%a[%a\-]*)%s(%a[%a\-]*)%s*$' );&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToAuthorName: «' .. fullName .. '»: have «Fa, I. O.» match' );&lt;br /&gt;
		return f .. '&amp;amp;nbsp;'&lt;br /&gt;
			.. mw.ustring.sub( i, 1, 1 ) .. '.&amp;amp;nbsp;'&lt;br /&gt;
			.. mw.ustring.sub( o, 1, 1 ) .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local f1, f2, i = mw.ustring.match( fullName, '^%s*(%a[%a\-]*)%s(%a[%a\-]*)\,%s(%a[%a\-]*)%s*$' );&lt;br /&gt;
	if ( f1 ) then&lt;br /&gt;
		mw.log( 'personNameToAuthorName: «' .. fullName .. '»: have «Fa Fa, I» match' );&lt;br /&gt;
		return f1 .. '&amp;amp;nbsp;' .. f2 .. '&amp;amp;nbsp;'&lt;br /&gt;
			.. mw.ustring.sub( i, 1, 1 ) .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i, o, f = mw.ustring.match( fullName, '^%s*(%a)\.%s(%a)\.%s(%a[%a\-]+)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToAuthorName: «' .. fullName .. '»: have «I. O. Fa» match' );&lt;br /&gt;
		return f .. '&amp;amp;nbsp;' .. i .. '.&amp;amp;nbsp;' .. o .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i1, i2, i3, f = mw.ustring.match( fullName, '^%s*(%a)\.%s(%a)\.%s(%a)\.%s(%a[%a\-]+)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToAuthorName: «' .. fullName .. '»: have «I. O. ?. Fa» match' );&lt;br /&gt;
		return f .. '&amp;amp;nbsp;' .. i1 .. '.&amp;amp;nbsp;' .. i2 .. '.&amp;amp;nbsp;' .. i3 .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
    -- Joel J. P. C. Rodrigues&lt;br /&gt;
	local i1, i2, i3, i4, f = mw.ustring.match( fullName, '^%s*(%a)[%a\-]+%s(%a)\.%s(%a)\.%s(%a)\.%s(%a[%a\-]+)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToAuthorName: «' .. fullName .. '»: have «I. O. ?. Fa» match' );&lt;br /&gt;
		return f .. '&amp;amp;nbsp;' .. i1 .. '.&amp;amp;nbsp;' .. i2 .. '.&amp;amp;nbsp;' .. i3 .. '.&amp;amp;nbsp;' .. i4 .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i, o, f = mw.ustring.match( fullName, '^%s*(%a[%a\-]*)%s(%a)\.%s(%a[%a\-]*)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToAuthorName: «' .. fullName .. '»: have «Im O. Fa» match' );&lt;br /&gt;
		return f .. '&amp;amp;nbsp;' .. mw.ustring.sub( i, 1, 1 ) .. '.&amp;amp;nbsp;' .. o .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i1, i2, i3, f = mw.ustring.match( fullName, '^%s*(%a[%a\-]*)%s(%a)\.%s(%a)\.%s(%a[%a\-]*)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToAuthorName: «' .. fullName .. '»: have «Im I. I. Fa» match' );&lt;br /&gt;
		return f .. '&amp;amp;nbsp;' .. mw.ustring.sub( i1, 1, 1 ) .. '.&amp;amp;nbsp;' .. i2 .. '.&amp;amp;nbsp;' .. i3 .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i, o, f = mw.ustring.match( fullName, '^%s*(%a[%a\-]*)%s(%a[%a\-]*)%s(%a[%a\-]*)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToAuthorName: «' .. fullName .. '»: have «Im Ot Fa» match' );&lt;br /&gt;
		return f .. '&amp;amp;nbsp;' .. mw.ustring.sub( i, 1, 1 ) .. '.&amp;amp;nbsp;' .. mw.ustring.sub( o, 1, 1 ) .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i, o, f = mw.ustring.match( fullName, '^%s*(%a[%a\-]+)%s(%a[%a\-]+)%s+оглы%s+(%a[%a\-]+)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToAuthorName: «' .. fullName .. '»: have «Im Ot оглы Fa» match' );&lt;br /&gt;
		return f .. '&amp;amp;nbsp;' .. mw.ustring.sub( i, 1, 1 ) .. '.&amp;amp;nbsp;' .. mw.ustring.sub( o, 1, 1 ) .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i1, i2, f = mw.ustring.match( fullName, '^%s*(%a[%a\-]+)%s(%a[%a\-]+)%s+de%s+(%a[%a\-]+)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToAuthorName: «' .. fullName .. '»: have «I1 I2 de Fa» match' );&lt;br /&gt;
		return f .. '&amp;amp;nbsp;' .. mw.ustring.sub( i1, 1, 1 ) .. '.&amp;amp;nbsp;' .. mw.ustring.sub( i2, 1, 1 ) .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i, f = mw.ustring.match( fullName, '^%s*(%a[%a\-\']+)%s(%a[%a\-\']+)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToAuthorName: «' .. fullName .. '»: have «Im Fa» match' );&lt;br /&gt;
		return f .. '&amp;amp;nbsp;' .. mw.ustring.sub( i, 1, 1 ) .. '.';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	mw.log( 'Unmatched any pattern: «' .. fullName .. '»' );&lt;br /&gt;
	return fullName;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function personNameToResponsibleName( fullName )&lt;br /&gt;
	if ( not fullName ) then return fullName; end&lt;br /&gt;
&lt;br /&gt;
	local f, i, o = mw.ustring.match( fullName, '^%s*(%a[%a\-]*)\,%s(%a[%a\-]*)%s(%a[%a\-]*)%s*$' );&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToResponsibleName: «' .. fullName .. '»: have «Fa, I. O.» match' );&lt;br /&gt;
		return mw.ustring.sub( i, 1, 1 ) .. '.&amp;amp;nbsp;' .. mw.ustring.sub( o, 1, 1 ) .. '.&amp;amp;nbsp;' .. f;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local f1, f2, i = mw.ustring.match( fullName, '^%s*(%a[%a\-]*)%s(%a[%a\-]*)\,%s(%a[%a\-]*)%s*$' );&lt;br /&gt;
	if ( f1 ) then&lt;br /&gt;
		mw.log( 'personNameToResponsibleName: «' .. fullName .. '»: have «Fa Fa, I» match' );&lt;br /&gt;
		return  mw.ustring.sub( i, 1, 1 ) .. '&amp;amp;nbsp;' .. f1 .. '&amp;amp;nbsp;' .. f2;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i, o, f = mw.ustring.match( fullName, '^%s*(%a)\.%s(%a)\.%s(%a[%a\-]+)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'v: «' .. fullName .. '»: have «I. O. Fa» match' );&lt;br /&gt;
		return i .. '.&amp;amp;nbsp;' .. o .. '.&amp;amp;nbsp;' .. f;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i1, i2, i3, f = mw.ustring.match( fullName, '^%s*(%a)\.%s(%a)\.%s(%a)\.%s(%a[%a\-]+)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToResponsibleName: «' .. fullName .. '»: have «I. O. ?. Fa» match' );&lt;br /&gt;
		return  i1 .. '.&amp;amp;nbsp;' .. i2 .. '.&amp;amp;nbsp;' .. i3 .. '.&amp;amp;nbsp;' .. f;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
    -- Joel J. P. C. Rodrigues&lt;br /&gt;
	local i1, i2, i3, i4, f = mw.ustring.match( fullName, '^%s*(%a)[%a\-]+%s(%a)\.%s(%a)\.%s(%a)\.%s(%a[%a\-]+)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToResponsibleName: «' .. fullName .. '»: have «I. O. ?. Fa» match' );&lt;br /&gt;
		return  i1 .. '.&amp;amp;nbsp;' .. i2 .. '.&amp;amp;nbsp;' .. i3 .. '.&amp;amp;nbsp;' .. i4 .. '.&amp;amp;nbsp;' .. f;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i, o, f = mw.ustring.match( fullName, '^%s*(%a[%a\-]*)%s(%a)\.%s(%a[%a\-]*)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToResponsibleName: «' .. fullName .. '»: have «Im O. Fa» match' );&lt;br /&gt;
		return mw.ustring.sub( i, 1, 1 ) .. '.&amp;amp;nbsp;' .. o .. '.&amp;amp;nbsp;' .. f;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i, o, f = mw.ustring.match( fullName, '^%s*(%a[%a\-]*)%s(%a[%a\-]*)%s(%a[%a\-]*)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToResponsibleName: «' .. fullName .. '»: have «Im Ot Fa» match' );&lt;br /&gt;
		return mw.ustring.sub( i, 1, 1 ) .. '.&amp;amp;nbsp;' .. mw.ustring.sub( o, 1, 1 ) .. '.&amp;amp;nbsp;' .. f;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i, o, f = mw.ustring.match( fullName, '^%s*(%a[%a\-]+)%s(%a[%a\-]+)%s+оглы%s+(%a[%a\-]+)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToResponsibleName: «' .. fullName .. '»: have «Im Ot оглы Fa» match' );&lt;br /&gt;
		return  mw.ustring.sub( i, 1, 1 ) .. '.&amp;amp;nbsp;' .. mw.ustring.sub( o, 1, 1 ) .. '.&amp;amp;nbsp;' .. f;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local i, f = mw.ustring.match( fullName, '^%s*(%a[%a\-\']+)%s(%a[%a\-\']+)%s*$');&lt;br /&gt;
	if ( f ) then&lt;br /&gt;
		mw.log( 'personNameToResponsibleName: «' .. fullName .. '»: have «Im Fa» match' );&lt;br /&gt;
		return  mw.ustring.sub( i, 1, 1 ) .. '.&amp;amp;nbsp;' .. f;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	mw.log( 'Unmatched any pattern: «' .. fullName .. '»' );&lt;br /&gt;
	return fullName;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderSource( frame )&lt;br /&gt;
	p.currentFrame = frame;&lt;br /&gt;
&lt;br /&gt;
	local arg = frame.args[1];&lt;br /&gt;
	local refAnchor = frame.args['ref'];&lt;br /&gt;
	local refAnchorYear = frame.args['ref-year'];&lt;br /&gt;
	local args = {};&lt;br /&gt;
	args.part = frame.args['part'];&lt;br /&gt;
	args.parturl = frame.args['parturl'];&lt;br /&gt;
	args.pages = frame.args['pages'];&lt;br /&gt;
	args.refAnchor = frame.args['ref'];&lt;br /&gt;
	args.refAnchorYear = frame.args['ref-year'];&lt;br /&gt;
	args.url = frame.args['url'];&lt;br /&gt;
&lt;br /&gt;
	return p.renderSourceImpl( mw.text.trim( arg ), args );&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderSourceImpl( entityId, args )&lt;br /&gt;
	args = args or {};&lt;br /&gt;
&lt;br /&gt;
	local snaks = {};&lt;br /&gt;
	snaks.P248 = { toWikibaseEntityIdSnak( 'P248', entityId ) };&lt;br /&gt;
	snaks.P805 = { toWikibaseEntityIdSnak( 'P805', entityId ) };&lt;br /&gt;
	copyArgsToSnaks( args, snaks );&lt;br /&gt;
&lt;br /&gt;
	local rendered = renderReferenceImpl( mw.wikibase.getEntity(), { snaks = snaks }, args.refAnchor, args.refAnchorYear );&lt;br /&gt;
	if ( rendered ) then return rendered.text end;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderReference( frame, currentEntity, reference )&lt;br /&gt;
	p.currentFrame = frame;&lt;br /&gt;
&lt;br /&gt;
	-- template call&lt;br /&gt;
	if ( frame and not currentEntity and not reference ) then&lt;br /&gt;
		local args = frame.args;&lt;br /&gt;
		if ( #frame.args == 0 ) then&lt;br /&gt;
			args = frame:getParent().args;&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		local snaks = {};&lt;br /&gt;
&lt;br /&gt;
		if ( args[1] ) then&lt;br /&gt;
			snaks.P248 = { toWikibaseEntityIdSnak( &amp;quot;P248&amp;quot;, args[1] ) };&lt;br /&gt;
			snaks.P805 = { toWikibaseEntityIdSnak( &amp;quot;P805&amp;quot;, args[1] ) };&lt;br /&gt;
		end&lt;br /&gt;
		copyArgsToSnaks( args, snaks );&lt;br /&gt;
&lt;br /&gt;
		currentEntity = mw.wikibase.getEntity();&lt;br /&gt;
		reference = { snaks = snaks };&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local rendered = renderReferenceImpl( currentEntity, reference );&lt;br /&gt;
&lt;br /&gt;
	if ( not rendered ) then&lt;br /&gt;
		return '';&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local result;&lt;br /&gt;
	local code = rendered.code or rendered.text;&lt;br /&gt;
	-- Про выбор алгоритма хеширования см. [[Модуль:Hash]]. Знак подчёркивания в начале позволяет&lt;br /&gt;
	-- исключить ошибку, когда имя сноски — чисто числовое значение, каковыми иногда бывают хеши.&lt;br /&gt;
	result = frame:extensionTag( 'ref', rendered.text, { name = '_' .. mw.hash.hashValue('fnv164', code) } ) .. '[[Category:Википедия:Статьи с источниками из Викиданных]]';&lt;br /&gt;
&lt;br /&gt;
	return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function renderReferenceImpl( currentEntity, reference, refAnchor, refAnchorYear )&lt;br /&gt;
	if ( not reference.snaks ) then&lt;br /&gt;
		return nil;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- контекст, содержит также кеш элементов&lt;br /&gt;
	local context = {&lt;br /&gt;
		cache = {},&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	-- данные в простом формате, согласованном с модулями формирования библиографического описания&lt;br /&gt;
	local data = {};&lt;br /&gt;
&lt;br /&gt;
    -- забрать данные из reference&lt;br /&gt;
    populateDataFromClaims( context, nil, reference.snaks, data )&lt;br /&gt;
&lt;br /&gt;
	-- update ref name with ref-specific properties&lt;br /&gt;
	if ( data.code ) then&lt;br /&gt;
		if ( data.part ) then data.code = data.code .. '-' .. getSingle( data.part ) end&lt;br /&gt;
		if ( data.pages ) then data.code = data.code .. '-' .. getSingle( data.pages ) end&lt;br /&gt;
		if ( data.volume ) then data.code = data.code .. '-' .. getSingle( data.volume ) end&lt;br /&gt;
		if ( data.issue ) then data.code = data.code .. '-' .. getSingle( data.issue ) end&lt;br /&gt;
		if ( data.url ) then data.code = data.code .. '-' .. getSingle( data.url ) end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	expandSpecials( context, currentEntity, reference, data );&lt;br /&gt;
&lt;br /&gt;
	local sourceEntity = nil;&lt;br /&gt;
	if ( data.sourceId ) then&lt;br /&gt;
		sourceEntity = getEntity( context, data.sourceId );&lt;br /&gt;
		if ( sourceEntity ) then&lt;br /&gt;
			populateSourceDataImpl( context, sourceEntity, data );&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if ( data.publication ) then&lt;br /&gt;
		expandPublication( context, sourceEntity, data );&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	expandBookSeries( context, data );&lt;br /&gt;
&lt;br /&gt;
	if ( next( data ) == nil ) then&lt;br /&gt;
		return nil;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local rendered;&lt;br /&gt;
	if ( p.short ) then&lt;br /&gt;
		rendered = renderShortReference( data );&lt;br /&gt;
		if ( mw.ustring.len( rendered.text ) == 0 ) then&lt;br /&gt;
			return nil;&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	else&lt;br /&gt;
		rendered = renderSource( context, data );&lt;br /&gt;
		if ( mw.ustring.len( rendered.text ) == 0 ) then&lt;br /&gt;
			return nil;&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if ( refAnchor ) then&lt;br /&gt;
			local anchorValue = 'CITEREF' .. refAnchor .. ( coalesce( refAnchorYear, data.year ) or '' );&lt;br /&gt;
			rendered.text = '&amp;lt;span class=&amp;quot;citation&amp;quot; id=&amp;quot;' .. mw.uri.anchorEncode( anchorValue ) .. '&amp;quot;&amp;gt;' .. rendered.text .. '&amp;lt;/span&amp;gt;';&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return rendered;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p;&lt;/div&gt;</summary>
		<author><name>Vlsergey</name></author>	</entry>

	</feed>