Module:Hatnote list: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
m (Changed some variable and structure names: forRow's second item is a table called "pages" instead of a table called "see" now; more logical naming) |
m (Tweaked a comment to reflect last edit, and fixed an outdated comment) |
||
Line 65: | Line 65: | ||
-- Structure the data out from the parameter list |
-- Structure the data out from the parameter list |
||
-- forTable is the wrapper table, with forRow rows |
-- forTable is the wrapper table, with forRow rows |
||
-- |
-- Rows are tables of a "use" string and a "pages" table of pagename strings |
||
local forTable = {} |
local forTable = {} |
||
local i = from |
local i = from |
||
Line 79: | Line 79: | ||
-- New empty list of pages |
-- New empty list of pages |
||
forRow.pages = {} |
forRow.pages = {} |
||
-- If there's not at least one page listed, |
-- If there's not at least one page listed, use the default, and break |
||
-- the |
-- at the end of this loop-through. |
||
table.insert(forRow.pages, args[i + 1] or (options.title .. options.disambiguator)) |
table.insert(forRow.pages, args[i + 1] or (options.title .. options.disambiguator)) |
||
-- 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 |