Module:Hatnote list: Difference between revisions

Removed options.disambiguator and moved its uses to new mHatnote.disambiguate()
(Updated from sandbox)
(Removed options.disambiguator and moved its uses to new mHatnote.disambiguate())
Line 76:
--default options table used across the forSee family of functions
local forSeeDefaultOptions = {
disambiguator = ' (disambiguation)',
title = mw.title.getCurrentTitle().text,
otherText = 'other uses',
Line 123 ⟶ 122:
forRow.pages = {}
-- If there's not at least one page listed, use the default.
table.insert(forRow.pages, args[i + 1] or mHatnote.disambiguate(options.title .. options.disambiguator))
-- 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
Line 157 ⟶ 156:
local useStr = v.use or options.otherText
local pagesStr = p.andList(mHatnote.formatPages(unpack(v.pages))) or
mHatnote._formatLink(mHatnote.disambiguate(options.title .. options.disambiguator))
local forSeeStr = string.format(options.forseeForm, useStr, pagesStr)
for k, v in pairs(options.punctuationCollapseReplacements) do
Anonymous user