10,731
edits
TheNightAvl (talk | contribs) mNo edit summary |
TheNightAvl (talk | contribs) m (Fixed multi-rhyme function) |
||
Line 73: | Line 73: | ||
local i = 1 | local i = 1 | ||
while args[i] ~= nil do | while args[i] ~= nil or args[i+1] ~= nil do | ||
mw.log("Processing argument " .. i .. ".") | mw.log("Processing argument " .. i .. ".") | ||
if parameter[args[i]] ~= nil then -- mode changer | if parameter[args[i]] ~= nil then -- mode changer | ||
Line 101: | Line 101: | ||
if args[i] == "no auto" then | if args[i] == "no auto" then | ||
syllables_no_auto = true | syllables_no_auto = true | ||
elseif args[i] == "" then | elseif args[i] == "" or args[i] == nil then | ||
if mw.ustring.find(working_syllables, "(%|)") then | if mw.ustring.find(working_syllables, "(%|)") then | ||
table.insert(syllables, working_syllables) | table.insert(syllables, working_syllables) | ||
Line 109: | Line 109: | ||
elseif args[i+1] == nil then | elseif args[i+1] == nil then | ||
working_syllables = working_syllables .. "|" .. args[i] | working_syllables = working_syllables .. "|" .. args[i] | ||
table.insert(syllables, working_syllables) | |||
mw.log("Syllables: " .. working_syllables .. " registered.") | |||
working_syllables = "" | |||
else | else | ||
working_syllables = working_syllables .. "|" .. args[i] | working_syllables = working_syllables .. "|" .. args[i] |