Content deleted Content added
sync require strict |
re-add extracting color |
||
Line 79:
~= cfg.pattern.navbox
)
end
-- extract text color from css, which is the only permitted CSS for the navbar
local function extractcolor(str)
-- return nil because navbar takes its argument into mw.html which handles
-- nil gracefully, and it removes the associated style attribute
return mw.ustring.match(';' .. str .. ';', '.*;%s*([Cc][Oo][Ll][Oo][Rr]%s*:%s*.-)%s*;') or nil
end
Line 86 ⟶ 93:
[cfg.navbar.name] = args[cfg.arg.name],
[cfg.navbar.mini] = 1,
[cfg.navbar.fontstyle] = extractcolor(
(args[cfg.arg.
)
})
end
|