Module:Hatnote list: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
m (Protected "Module:Hatnote list": High-risk Lua module ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))) |
(Removed default texts set in forSeeArgsToTable(); unset items in table are now empty rather than filled with defaults; defaults are filled in forSeeTableToString().) |
||
Line 115: | Line 115: | ||
-- New empty row |
-- New empty row |
||
local forRow = {} |
local forRow = {} |
||
-- If there's a blank use, assume the list's ended, |
-- If there's a blank use, assume the list's ended, leave empty for |
||
-- and break at the end of this loop-through. |
-- defaulting elsewhere, and break at the end of this loop-through. |
||
forRow.use = args[i] |
forRow.use = args[i] |
||
if not args[i] then terminated = true end |
if not args[i] then terminated = true end |
||
-- New empty list of pages |
-- New empty list of pages |
||
forRow.pages = {} |
forRow.pages = {} |
||
-- Try to insert first pages item; empty is ignored/defaulted elsewhere |
|||
-- If there's not at least one page listed, use the default. |
|||
table.insert(forRow.pages, args[i + 1] |
table.insert(forRow.pages, args[i + 1]) |
||
-- If the option after next is "and", do an inner loop where we collect |
-- If the option after next is "and", do an inner loop where we collect |
||
-- items following "and"'s until the "and"'s stop. If there's a blank |
-- items following "and"'s until the "and"'s stop. If there's a blank |