Jump to content

Module:Navbox: Difference between revisions

fix handling of the border param
m>WOSlinker
(add \n to make navboxes with class hlist work for fist item in list)
m>Toohool
(fix handling of the border param)
Line 6: Line 6:


local gutterRow = '<tr style="height:2px;"><td></td></tr>'
local gutterRow = '<tr style="height:2px;"><td></td></tr>'
local border
local listnums = {}
local listnums = {}
local ret = {}
local ret = {}
Line 16: Line 17:
         end
         end
     end
     end
end
function trim(s)
    return (mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1"))
end
end


Line 158: Line 163:
     table.sort(listnums)
     table.sort(listnums)
      
      
     local border = args.border or args[1]
     border = trim(args.border or args[1] or '')
     if border == 'subgroup' or border == 'child' then
     if border == 'subgroup' or border == 'child' then
         add('</div>')
         add('</div>')
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.