「モジュール:Wd」の版間の差分
ナビゲーションに移動
検索に移動
en:Module:Wd 2017年2月2日 (木) 21:09(UTC)より
template>K-iczn (en:Module:Wd 2017年1月19日 (木) 18:55(UTC)より) |
template>K-iczn (en:Module:Wd 2017年2月2日 (木) 21:09(UTC)より) |
||
839行目: | 839行目: | ||
function Config:processFlag(flag) | function Config:processFlag(flag) | ||
if not flag then | |||
return false | |||
else | |||
flag = mw.text.trim(flag) | |||
end | |||
if flag == "linked" then | if flag == "linked" then | ||
self.curState.linked = true | self.curState.linked = true | ||
879行目: | 885行目: | ||
function Config:processFlagOrCommand(flag) | function Config:processFlagOrCommand(flag) | ||
local param = "" | local param = "" | ||
if not flag then | |||
return false | |||
else | |||
flag = mw.text.trim(flag) | |||
end | |||
if flag == "property" or flag == "properties" then | if flag == "property" or flag == "properties" then | ||
1,375行目: | 1,387行目: | ||
local hooks = {count = 0} | local hooks = {count = 0} | ||
local nextArg = | local nextArg = args[1] | ||
local nextIndex = 2 | local nextIndex = 2 | ||
-- process flags and commands | -- process flags and commands | ||
while _:processFlagOrCommand(nextArg) do | while _:processFlagOrCommand(nextArg) do | ||
nextArg = | nextArg = args[nextIndex] | ||
nextIndex = nextIndex + 1 | nextIndex = nextIndex + 1 | ||
end | |||
if nextArg then | |||
nextArg = mw.text.trim(nextArg) | |||
else | |||
nextArg = "" | |||
end | end | ||
1,526行目: | 1,544行目: | ||
local title = nil | local title = nil | ||
local nextArg = | local nextArg = args[1] | ||
local nextIndex = 2 | local nextIndex = 2 | ||
while _:processFlag(nextArg) do | while _:processFlag(nextArg) do | ||
nextArg = | nextArg = args[nextIndex] | ||
nextIndex = nextIndex + 1 | nextIndex = nextIndex + 1 | ||
end | |||
if nextArg then | |||
nextArg = mw.text.trim(nextArg) | |||
else | |||
nextArg = "" | |||
end | end | ||