Module:Sandbox/一位史蒂夫/1
< Module:Sandbox | 一位史蒂夫
跳到导航
跳到搜索
local getArgs = require('Module:Arguments').getArgs local p = {} local function toWikitext(text1) return mw.getCurrentFrame():preprocess(text1) end local function formatStudentName(name) return string.gsub(name, " ", "_") end function p.name(frame) if (not frame) then frame = mw.getCurrentFrame() end args = getArgs(frame) local charData = mw.text.jsonDecode(frame:expandTemplate{title="Module:BACharInfo/name"}) return charData[formatStudentName(args[1])]["Name"] end return p