5,078
edits
No edit summary |
No edit summary |
||
Line 39: | Line 39: | ||
Constructs a standard format reference using the given parameters, with the | Constructs a standard format reference using the given parameters, with the | ||
provided content. Content table supports unlimited numeric arguments, in | provided content. Content table supports unlimited numeric arguments, in | ||
addition to | addition to Subheading, Detail, Quote, Quotee and Suffix arguments. | ||
@param frame - object - The current parser frame | @param frame - object - The current parser frame | ||
Line 56: | Line 56: | ||
Generates the text content of a standard format reference from the provided | Generates the text content of a standard format reference from the provided | ||
arguments. Content table supports unlimited numeric arguments, in | arguments. Content table supports unlimited numeric arguments, in | ||
addition to | addition to subheading, detail, quote, quotee and suffix arguments. | ||
@param content - table - The content of the reference | @param content - table - The content of the reference | ||
Line 64: | Line 64: | ||
function makeRefText( content ) | function makeRefText( content ) | ||
local text = "''" .. tostring( content[ 1 ] or '' ) .. "''" | local text = "''" .. tostring( content[ 1 ] or '' ) .. "''" | ||
if not utils.empty( content. | if not utils.empty( content.subheading ) then | ||
text = text .. ': ' .. tostring( content.subheading ) | text = text .. ': ' .. tostring( content.subheading ) | ||
end | end | ||
Line 217: | Line 217: | ||
[ 'valid' ] = { 'id', 'subheading', 3, 4, 5, 6, 7, 'detail', 'quote', | [ 'valid' ] = { 'id', 'subheading', 3, 4, 5, 6, 7, 'detail', 'quote', | ||
'quotee', 'quoteelinktext', 'suffix' }, | 'quotee', 'quoteelinktext', 'suffix' }, | ||
[ 'aliases' ] = { [ 1 ] = 'heading | [ 'aliases' ] = { [ 1 ] = 'heading' } | ||
} ) | } ) | ||
local content = { | local content = { |