Module:Dièse couleur web
De Wicri Agronomie
Révision datée du 18 juin 2017 à 23:14 par Jacques Ducloy (discussion | contributions) (Page créée avec « local z = {}  function z.main(frame)      local value = mw.text.trim(frame.args[1])      if value:find('#') == 1 then         return '#' .. value:sub(2)     elseif mw.... »)
La documentation pour ce module peut être créée à Module:Dièse couleur web/doc
local z = {}
function z.main(frame)
    local value = mw.text.trim(frame.args[1])
    if value:find('#') == 1 then
        return '#' .. value:sub(2)
    elseif mw.ustring.match(value, '^%x%x%x%x%x%x$') or mw.ustring.match(value, '^%x%x%x$') then
        return '#' .. value
    else
        return value
    end
end
return z

