Module:Collapsed huge table: Difference between revisions

BudjarnLambeth (talk | contribs)
Created page with "local p = {} local utils = require("Module:Utils") local rat = require("Module:Rational") local ud = require("Module:Ups and downs notation") local ET = require("Module:ET")..."
Tags: Mobile edit Mobile web edit Advanced mobile edit
 
ArrowHead294 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 4: Line 4:
local ud = require("Module:Ups and downs notation")
local ud = require("Module:Ups and downs notation")
local ET = require("Module:ET")
local ET = require("Module:ET")
local yesno = require("Module:Yesno")


-- Gets mapping of a monzo in a val
-- Gets mapping of a monzo in a val
Line 83: Line 84:


local t_head = "{| class=\"wikitable center-1 right-2\"\n"
local t_head = "{| class=\"wikitable center-1 right-2\"\n"
if et.size > 10000 then
if et.size > 1 then
t_head = "{| class=\"wikitable center-1 right-2 mw-collapsible mw-collapsed\"\n"
t_head = "{| class=\"wikitable center-1 right-2 mw-collapsible mw-collapsed\"\n"
end
end
Line 168: Line 169:
wikitext = wikitext .. "|}"
wikitext = wikitext .. "|}"


return wikitext
local debugg = yesno(frame.args["debug"])
return frame:preprocess(debugg == true and "<syntaxhighlight lang=\"wikitext\">" .. wikitext .. "</syntaxhighlight>" or wikitext)
end
end


return p
return p