Module:Numlinks: Difference between revisions
No edit summary |
todo |
||
| Line 7: | Line 7: | ||
-- TODO: | -- TODO: | ||
-- - | -- - Refactor to use format strings instead of pretext-posttext | ||
-- Main function | -- Main function | ||
| Line 14: | Line 13: | ||
local num_links = args["Link Count"] or 1 -- Number of links to produce in each direction (left/prev and right/next) | local num_links = args["Link Count"] or 1 -- Number of links to produce in each direction (left/prev and right/next) | ||
local curr_num = args["Num"] -- Current number | local curr_num = args["Num"] -- Current number | ||
local min_num = args["Min"] or 1 -- Smallest | local min_num = args["Min"] or 1 -- Smallest valid number | ||
local link_text = args["Link Text"] or { "", "" } -- Text for a link is "<pre-text><num><post-text>" | local link_text = args["Link Text"] or { "", "" } -- Text for a link is "<pre-text><num><post-text>" | ||
local disp_text = args["Displayed Text"] or nil -- Option for if the text to display is different from the link (EG, "4L 5s <3/1>"" vs "4L 5s (3/1-equivalent)") | local disp_text = args["Displayed Text"] or nil -- Option for if the text to display is different from the link (EG, "4L 5s <3/1>"" vs "4L 5s (3/1-equivalent)") | ||