Module:Color contrast: Difference between revisions
typos
m>Frietjes (new styleratio for parsing css style statements) |
m>Frietjes (typos) |
||
Line 154: | Line 154: | ||
local bg, fg = (args[2] or 'white'), (args[3] or 'black') | local bg, fg = (args[2] or 'white'), (args[3] or 'black') | ||
local slist = mw.text.split( | local slist = mw.text.split(style or '', ';') | ||
for k = 1,#slist do | for k = 1,#slist do | ||
s = slist[k] | s = slist[k] | ||
local k,v = s:match( '^[%s* | local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) | ||
k = k or '' | k = k or '' | ||
v = v or '' | v = v or '' |