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

Content deleted Content added
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
పంక్తి 180:
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 {
Line 231 ⟶ 245:
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/మాడ్యూల్:Hatnote" నుండి వెలికితీశారు