"మాడ్యూల్:Hatnote" కూర్పుల మధ్య తేడాలు

Jump to navigation Jump to search
parse pages for section-only links as nil - this prevents section-only links that have an italicized page parameter from having empty <i></i> tags
(Remove stray space per edit request; update comment and error message for move of Template:Format hatnote link to Template:Format link in 2014)
(parse pages for section-only links as nil - this prevents section-only links that have an italicized page parameter from having empty <i></i> tags)
local prePipe, display = link:match('^(.-)|(.*)$')
link = prePipe or link
 
-- Find the page, if it exists.
-- For links like [[#Bar]], the page will be nil.
local preHash, postHash = link:match('^(.-)#(.*)$')
local page
if not preHash then
-- We have a link like [[Foo]].
page = page or link
elseif preHash ~= '' then
-- We have a link like [[Foo#Bar]].
page = preHash
end
 
-- Find the section, if it exists.
local page, section = link:match('^(.-)#(.*)$')
if postHash and postHash ~= '' then
page = page or link
section = postHash
end
return {
local page = maybeItalicize(parsed.page, options.italicizePage)
local section = maybeItalicize(parsed.section, options.italicizeSection)
if not page or page == '' then
display = string.format('§&nbsp;%s', section)
elseif section then
"https://te.wikipedia.org/wiki/ప్రత్యేక:MobileDiff/3019165" నుండి వెలికితీశారు

మార్గదర్శకపు మెనూ