Module:Color contrast: Difference between revisions

m
local
m>Frietjes
(fix for encoded # in hex or decimal (screws up assumption that we can split on ;))
m>Ahecht
m (local)
Line 169: Line 169:
local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '#', '#'), ';')
local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '#', '#'), ';')
for k = 1,#slist do
for k = 1,#slist do
s = slist[k]
local s = slist[k]
local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' )
local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' )
k = k or ''
k = k or ''
Anonymous user