Module:ColorParse: Difference between revisions
Jump to navigation
Jump to search
(allow option to make it output old & delimited color codes) |
mNo edit summary |
||
Line 115: | Line 115: | ||
-- alternation | pattern will stretch to fit word length (?) | -- alternation | pattern will stretch to fit word length (?) | ||
local type = type or 'default' | local type = type or 'default' | ||
local rasterize = rasterize | local rasterize = false | ||
if rasterize == 'true' then | |||
rasterize = true | |||
end | |||
local strtbl = strtotbl(text) | local strtbl = strtotbl(text) | ||
local finaltbl = {} | local finaltbl = {} | ||
Line 168: | Line 171: | ||
local args = process_args.merge(true) | local args = process_args.merge(true) | ||
if args[1] and args[2] then -- shader template | if args[1] and args[2] then -- shader template | ||
output = applytemplate(args[1], args[2], (args['rasterize'] or | output = applytemplate(args[1], args[2], (args['rasterize'] or 'true')) | ||
else | else | ||
output = p.shader(args['text'], args['colors'], args['type'], args['rasterize']) | output = p.shader(args['text'], args['colors'], args['type'], args['rasterize']) |