17 214
contributi
(Added supoort for predefinite styles and classes/styles parsing) |
m (Managed empty strings in parsing. Fixed mw.clone errors) |
||
local css = {}
local str = require('Modulo:Wikilib/strings') -- luacheck: no unused
local w = require('Modulo:Wikilib')
local c = mw.loadData('Modulo:Colore/data')
-- Parses an HTML class attribute value into a list of strings
parser.parseClasses = function(classes)
elseif type(classes) ~= 'string' then
return classes
end
return mw.text.split(classes, ' ')
end
--]]
parser.parseStyles = function(stys)
if
return {}
elseif type(stys) ~= 'string' then
return stys
end
stys = parser.parseStyles(stys or {})
if pdfs and pdfs ~= '' then
pdfs = type(pdfs) == 'string' and mw.text.split(pdfs, ' ') or pdfs
for _, predef in pairs(pdfs) do
stys is the second argument of table.merge so that
▲ --]]
--]]
stys = table.merge(pdf.styles, stys)
end
end
end
--]]
css['horiz-grad'] = function(frame)
return css.horizGradLua(
end
css.horizGrad, css.horiz_grad = css['horiz-grad'], css['horiz-grad']
--]]
css['vert-grad'] = function(frame)
return css.vertGradLua(
end
css.vertGrad, css.vert_grad = css['vert-grad'], css['vert-grad']
--]]
css['slanted-grad'] = function(frame)
return css.slantedGradLua(
end
css.slantedGrad, css.slanted_grad =
--]]
css['radial-grad'] = function(frame)
return css.radialGradLua(
end
css.radialGrad, css.radial_grad =
|
contributi