Module:Separated entries: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 9:
function p._main(args)
local span = args.span or false
local author = args.author or false
local separator = args.separator
-- Decode (convert to Unicode) HTML escape sequences, such as " " for space.
Line 24 ⟶ 25:
local values = compressSparseArray(args)
if span then
local spanAttrs = {}
return mw.text.tag( span, {}, mw.text.listToText(values, separator, conjunction) )
if author then
spanAttrs.class = 'templatequote-author'
end
return mw.text.tag( 'span', {}spanAttrs, mw.text.listToText(values, separator, conjunction) )
else
return mw.text.listToText(values, separator, conjunction)