Zum Inhalt springen

Modul:Hatnote: Unterschied zwischen den Versionen

Remove stray space per edit request; update comment and error message for move of Template:Format hatnote link to Template:Format link in 2014
(don't add pages in the user namespace to Category:Hatnote templates with errors)
(Remove stray space per edit request; update comment and error message for move of Template:Format hatnote link to Template:Format link in 2014)
Zeile 130: Zeile 130:
-- with colons if necessary, and links to sections are detected and displayed
-- with colons if necessary, and links to sections are detected and displayed
-- with " § " as a separator rather than the standard MediaWiki "#". Used in
-- with " § " as a separator rather than the standard MediaWiki "#". Used in
-- the {{format hatnote link}} template.
-- the {{format link}} template.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


Zeile 141: Zeile 141:
return p.makeWikitextError(
return p.makeWikitextError(
'no link specified',
'no link specified',
'Template:Format hatnote link#Errors',
'Template:Format link#Errors',
args.category
args.category
)
)
Zeile 231: Zeile 231:
local page = maybeItalicize(parsed.page, options.italicizePage)
local page = maybeItalicize(parsed.page, options.italicizePage)
local section = maybeItalicize(parsed.section, options.italicizeSection)
local section = maybeItalicize(parsed.section, options.italicizeSection)
if section then
if not page or page == '' then
display = string.format('§ %s', section)
elseif section then
display = string.format('%s § %s', page, section)
display = string.format('%s § %s', page, section)
else
else
Anonymer Benutzer