"मोड्युल: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
पङ्क्ति १८०:
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 २३१ ⟶ २४५:
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://ne.wikipedia.org/wiki/मोड्युल:Hatnote" बाट अनुप्रेषित