Module:Hatnote: Difference between revisions

49 bytes added ,  10 years ago
change the rellink class to the new "hatnote" class, and update the comments
m>Mr. Stradivarius
(use the blacklist from Module:Category handler in the makeWikitextError function)
m>Mr. Stradivarius
(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 {{rellink}} and {{hatnote}} meta-templates, and includes    --
-- implements the {{hatnote}} and {{format hatnote link}} meta-templates, and --
-- helper functions for other Lua modules to format hatnote links.           --
-- 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 = {'rellink'}
local classes = {'hatnote'}
local extraclasses = options.extraclasses
local extraclasses = options.extraclasses
local selfref = options.selfref
local selfref = options.selfref
Anonymous user