Module:Hatnote: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(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) |
||
Line 130: | Line 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 |
-- the {{format link}} template. |
||
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
||
Line 141: | Line 141: | ||
return p.makeWikitextError( |
return p.makeWikitextError( |
||
'no link specified', |
'no link specified', |
||
'Template:Format |
'Template:Format link#Errors', |
||
args.category |
args.category |
||
) |
) |
||
Line 231: | Line 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 |
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 |