Toggle menu
68
66
13
4496
1F616EMO Survival Server Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 12:23, 14 January 2025 by 1F616EMO (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

--模組用於提供轉換組加上分類的支援
local p = {}
local lib_arg = {}

function p.main(frame)
	local args, working_frame
    if frame == mw.getCurrentFrame() then
        -- We're being called via #invoke. The args are passed through to the module
        -- from the template page, so use the args that were passed into the template.
        if lib_arg.getArgs == nil then lib_arg = require('Module:Arguments') end
        args = lib_arg.getArgs(frame)
        working_frame = frame
    else
        -- We're being called from another module or from the debug console, so assume
        -- the args are passed in directly.
        args = frame
        working_frame = mw.getCurrentFrame()
        if type(args) ~= type({}) then args = {frame} end
    end
    local root = mw.html.create()
    local lib_doc = require('Module:Documentation')
    local env = lib_doc.getEnvironment(args)
    root:wikitext(lib_doc._getModuleWikitext(args, env))
	return tostring(root)
end

return p