Modul:Hatnote: Unterschied zwischen den Versionen
change the rellink class to the new "hatnote" class, and update the comments
(use the blacklist from Module:Category handler in the makeWikitextError function) |
(change the rellink class to the new "hatnote" class, and update the comments) |
||
Zeile 3: | Zeile 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. -- | ||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
Zeile 107: | Zeile 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. | |||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
Zeile 172: | Zeile 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 |