-
WikiChip
WikiChip
-
Architectures
Popular x86
-
Intel
- Client
- Server
- Big Cores
- Small Cores
-
AMD
Popular ARM
-
ARM
- Server
- Big
- Little
-
Cavium
-
Samsung
-
-
Chips
Popular Families
-
Ampere
-
Apple
-
Cavium
-
HiSilicon
-
MediaTek
-
NXP
-
Qualcomm
-
Renesas
-
Samsung
-
From WikiChip
Difference between revisions of "Module:comptable"
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
− | function p. | + | function p.main(frame) |
if frame == mw.getCurrentFrame() then | if frame == mw.getCurrentFrame() then | ||
origArgs = frame:getParent().args | origArgs = frame:getParent().args |
Revision as of 05:29, 22 August 2017
Documentation for this module may be created at Module:comptable/doc
local p = {}
function p.main(frame)
if frame == mw.getCurrentFrame() then
origArgs = frame:getParent().args
else
origArgs = frame
end
local r = ''
for i = 2, 30 do
local val = origArgs[i]
if not val then break end
if string.find(val, ":") then
r = r .. string.gsub(val, "(%d+):(.+)", '<th colspan="%1">%2</th>')
else
r = r .. '<th>' .. val .. '</th>'
end
end
return '<tr class="comptable-header"><th> </th>' .. r .. '</tr>'
end
return p