মডিউল:Check for unknown parameters: সংশোধিত সংস্করণের মধ্যে পার্থক্য
বিষয়বস্তু বিয়োগ হয়েছে বিষয়বস্তু যোগ হয়েছে
Yahia.barie (আলোচনা | অবদান) অ হালনাগাদ করা হয়েছে |
আফতাবুজ্জামান (আলোচনা | অবদান) সম্পাদনা সারাংশ নেই |
||
১৬ নং লাইন:
local pargs = frame:getParent().args
local ignoreblank = isnotempty(frame.args['ignoreblank'])
local
local knownargs = {}
local unknown = frame.args['unknown'] or 'Found _VALUE_, '
local preview = frame.args['preview']
local res = {}
local regexps = {}
▲ local comments = {}
local ispreview = frame:preprocess( "{{REVISIONID}}" ) == "" and 1 or 0▼
-- create the list of known args, regular expressions, and the return string
৩৮ ⟶ ৩৪ নং লাইন:
end
end
if isnotempty(
preview = '<div class="hatnote" style="color:red"><strong>
elseif
preview = unknown
end▼
-- adds one result to the output tables▼
if k == '' then▼
-- Fix odd bug for | = which gets stripped to the empty string and▼
-- breaks category links▼
k = ' '▼
end▼
local r = unknown:gsub('_VALUE_', k)▼
table.insert(res, r)▼
end
৭১ ⟶ ৫২ নং লাইন:
if not knownflag and ( not ignoreblank or isnotempty(v) ) then
k = mw.ustring.gsub(k, '[^%w\-_ ]', '?')
end
elseif
knownargs[tostring(k)] == nil and
(
then
local vlen = mw.ustring.len(v)
v = mw.ustring.sub(v, 1, (vlen < 25) and vlen or 25)
v = mw.ustring.gsub(v, '[^%w\-_ ]', '?')
table.insert(values, k .. ' = ' .. v .. ((vlen >= 25) and ' ...' or ''))
end
end
if #
unknown = preview
for k, v in pairs(values) do
▲ -- Fix odd bug for | = which gets stripped to the empty string and
▲ -- breaks category links
end
▲ table.insert(res, r)
▲ end
end
return table.concat(res)
end
|