Jump to content

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(s or '', ';')
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*]([^:]-):([^:]-)[%s;]*$' )
local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' )
k = k or ''
k = k or ''
v = v or ''
v = v or ''
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.