Module:Utilities: Difference between revisions

Jump to navigation Jump to search
Sur (talk | contribs)
m renderTabber() test
Sur (talk | contribs)
m both 2 previous edit tests removed
Line 47: Line 47:
    return result:gsub("(%u)(%u%l)", " %1%2")
    return result:gsub("(%u)(%u%l)", " %1%2")
end
end
p.pre_expand_str = function(frame)
local str = frame.args[1]
return str
end
function p.renderTabber()
    local tabNames = {"Home", "Profile", "Settings"}
    local tabContents = {"Content for Home", "Content for Profile", "Content for Settings"}
   
    local result = '<tabber>\n'
   
    for i = 1, #tabNames do
        result = result .. tabNames[i] .. ' = ' .. tabContents[i] .. '\n'
    end
   
    result = result .. '</tabber>'
   
    return result
end
return p
return p