Pagkakaiba sa pagitan ng mga pagbago ng "Module:SimpleDebug"

m
walang buod ng pagbabago
m
--2020-06-06 fix error which occasionally happens when a value == nil
local p = {}
 
p.nowiki = false
p.nohtml = false
p.plaintext_plaintext = false
p.counter = false
 
end --CheckWhereName
 
local function plainp._plain (text) --Modified from "Module:Plain text"
if not text then return end
text = mw.text.killMarkers(text)
return text
end --plain
 
function p._plain_len (text)
return mw.ustring.len (p._plain(text))
end
function p.plain (frame)
return p._plain (frame.args[1])
end
 
function p.plain_len (frame)
return p._plain_len (frame.args[1])
end
 
local function totext (text)
if p.plaintext_plaintext then
return plainp._plain (text)
else
return text
if p.enabled then
local str = ''
forif i#arg == 1, #arg0 dothen
if str ~= 'nil' then
else
str = str..vep
local c = 0
for k, i in ipairs(arg) do
c = k
end
--error (c)
for i = 1, #arg do
if str ~= '' then
str = str..vep
end
str = str..varx(arg[i])
end
str = str..varx(arg[i])
end
return str
function p.nv (...)
if p.enabled then
if math.mod(#arg,2) ~= 0 then
EndStr = 'Any parameter has not a name or variable'
else
function p.vtos (...)
if EnabAndBl () then
local end_nil_count = arg["n"] - #arg
p.s = p.s..p.v (unpack(arg))
for i = 1, end_nil_count do
p.s = p.s..pvep.nv (unpack(arg)).'nil'
end
end
end --vtos
function p.nvtos (...)
if EnabAndBl () then
local end_nil_count = arg["n"] - #arg
p.s = p.s..p.nv (unpack(arg))
if end_nil_count > 0 then
for i = 1, arg["n"] do
if math.mod(i,2) ~= 0 then
p.s = p.s..arg[i]..': '
else
p.s = p.s..p.wnv (where, unpackv(arg)[i])
if i < arg["n"] then
p.s = p.s..vep
end
end
end
else
p.s = p.s..p.nv (unpack(arg))
end
end
end --nvtos
function p.wnvtos (where, ...)
if EnabAndBl () then
local end_nil_count = arg["n"] - #arg
p.s = p.s..p.wnv (where, unpack(arg))
if end_nil_count > 0 then
p.s = p.s..where..arrow()
for i = 1, arg["n"] do
if math.mod(i,2) ~= 0 then
p.s = p.s..arg[i]..': '
else
p.s = p.s..p.v(arg[i])
if i < arg["n"] then
p.s = p.s..vep
end
end
end
else
p.s = p.s..p.wnv (where, unpack(arg))
end
end
end --wnvtos
35

edit