Changes

Jump to navigation Jump to search

Module:Hatnote

484 bytes added, 01:33, 10 September 2019
m
46 revisions imported
category
)
end
 
function p.disambiguate(page, disambiguator)
-- Formats a page title with a disambiguation parenthetical,
-- i.e. "Example" → "Example (disambiguation)".
checkType('disambiguate', 1, page, 'string')
checkType('disambiguate', 2, disambiguator, 'string', true)
disambiguator = disambiguator or 'disambiguation'
return string.format('%s (%s)', page, disambiguator)
end
local page, section = link:match('^(.-)#(.*)$')
if page then
display = page .. ' §  ' .. section
end
end
-- Assemble the link.
if display then
return string.format( '[[:%s|%s]]', string.gsub(link, '|(.*)$', ''), --display overwrites manual piping display )
else
return string.format('[[:%s]]', link)
checkType('_hatnote', 2, options, 'table', true)
options = options or {}
local classes = {'hatnote', 'navigation-not-searchable'}
local extraclasses = options.extraclasses
local selfref = options.selfref

Navigation menu