Module:HeroData/nav: Difference between revisions

Sur (talk | contribs)
m default herolabs_text_size to blank
Sur (talk | contribs)
m debug_mode param
Line 10: Line 10:
local sticker_size = frame.args['sticker_size']
local sticker_size = frame.args['sticker_size']
local herolabs_text_size = frame.args['herolabs_text_size']
local herolabs_text_size = frame.args['herolabs_text_size']
local debug_mode = frame.args['debug_mode']
if herolabs_text_size == nil then herolabs_text_size = '' end
-- Turn debug_mode from string to bool, default to false
if debug_mode == nil then
debug_mode = false
elseif debug_mode == 'true' then
debug_mode = true
elseif debug_mode == 'false' then
debug_mode = false
end


if in_herolabs ~= 'true' and in_herolabs ~= 'false' then
if in_herolabs ~= 'true' and in_herolabs ~= 'false' then
Line 59: Line 67:
ret = string.sub(ret, 1, -(string.len(' '))-1)
ret = string.sub(ret, 1, -(string.len(' '))-1)
return frame:preprocess(ret)
if debug_mode then
return ret
else -- evaluate wikitext if not in debug mode
return frame:preprocess(ret)
end
end
end
return p
return p