Module:Hatnote: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(use the blacklist from Module:Category handler in the makeWikitextError function) |
(change the rellink class to the new "hatnote" class, and update the comments) |
||
Line 3: | Line 3: | ||
-- -- |
-- -- |
||
-- This module produces hatnote links and links to related articles. It -- |
-- This module produces hatnote links and links to related articles. It -- |
||
-- implements the {{ |
-- implements the {{hatnote}} and {{format hatnote link}} meta-templates, and -- |
||
-- helper functions for other Lua modules |
-- includes helper functions for other Lua hatnote modules. -- |
||
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
||
Line 107: | Line 107: | ||
-- Makes a wikilink from the given link and display values. Links are escaped |
-- Makes a wikilink from the given link and display values. Links are escaped |
||
-- 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 "#". |
-- with " § " as a separator rather than the standard MediaWiki "#". Used in |
||
-- the {{format hatnote link}} template. |
|||
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
||
Line 172: | Line 173: | ||
checkType('_hatnote', 1, s, 'string') |
checkType('_hatnote', 1, s, 'string') |
||
checkType('_hatnote', 2, options, 'table', true) |
checkType('_hatnote', 2, options, 'table', true) |
||
local classes = {' |
local classes = {'hatnote'} |
||
local extraclasses = options.extraclasses |
local extraclasses = options.extraclasses |
||
local selfref = options.selfref |
local selfref = options.selfref |