242
个编辑
Willson-v-(讨论 | 贡献) (建立内容为“local module = {} local getArgs = require('Module:Arguments').getArgs local sortedArgs = require('Module:SortArgs').sortedArgs local initSpan = function(class…”的新页面) |
Willson-v-(讨论 | 贡献) 无编辑摘要 |
||
第2行: | 第2行: | ||
local getArgs = require('Module:Arguments').getArgs | local getArgs = require('Module:Arguments').getArgs | ||
local initSpan = function(className, templateName, frame) | local initSpan = function(className, templateName, frame) | ||
local args = getArgs(frame, { wrappers = 'Template:' .. templateName }) | local args = getArgs(frame, { wrappers = 'Template:' .. templateName }) | ||
local parent_args = frame:getParent().args; | |||
local span = mw.html.create('span') | local span = mw.html.create('span') | ||
第20行: | 第20行: | ||
} | } | ||
]] | ]] | ||
for k, v in | for k, v in pairs(args) do | ||
mw.log(k, v) | mw.log(k, v) | ||
if mw.ustring.sub(k, 1, 1) == '@' then | if mw.ustring.sub(k, 1, 1) == '@' then | ||
第84行: | 第84行: | ||
local branches = {} | local branches = {} | ||
local params = {} | local params = {} | ||
for k, v in | for k, v in args do | ||
if not mw.ustring.match(k, '^@[^@]') then | if not mw.ustring.match(k, '^@[^@]') then | ||
local i = 1 | local i = 1 |