Module:Card List: Difference between revisions

ReisuDesign (talk | contribs)
Created page with "local p = {} local lib = require('Module:Feature') local Card = require('Module:Card')._main function p.main(frame) local args = require('Module:Arguments').getArgs(frame, { parentFirst = true, removeBlanks = false, wrapper = { 'Template:Card List' } }) return p._main(args) end function p.splitNote(entry, notePattern) if notePattern then item, note = entry:match(notePattern) if item == nil then -- will be nil if note is not present return entry end..."
 
Fixed nil value error for field 'text'
 
(One intermediate revision by one other user not shown)
Line 43: Line 43:


-- all the non-boolean params except note_delim
-- all the non-boolean params except note_delim
local PARAMS_NOT_SUPPORTING_BLANKS = {"caption", "text", "amount", "delim", "amount_delim", "type", "caption_width"}
local PARAMS_NOT_SUPPORTING_BLANKS = {"caption", "amount", "delim", "amount_delim", "type", "caption_width"}


function p._main(args)
function p._main(args)
Line 231: Line 231:
end
end
end
end
end
local ASSIGNED_VALUES = {
'text',
'caption',
'note',
}
for _, key in ipairs(ASSIGNED_VALUES) do
finalArgs[key] = finalArgs[key] or ''
end
end