Module:Hatnote: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(fix function name) |
(use the blacklist from Module:Category handler in the makeWikitextError function) |
||
Line 11: | Line 11: | ||
local mArguments -- lazily initialise [[Module:Arguments]] |
local mArguments -- lazily initialise [[Module:Arguments]] |
||
local yesno -- lazily initialise [[Module:Yesno]] |
local yesno -- lazily initialise [[Module:Yesno]] |
||
local mCategoryHandler -- lazily initialise [[Module:Category handler]] |
|||
local p = {} |
local p = {} |
||
Line 80: | Line 81: | ||
checkType('makeWikitextError', 1, msg, 'string') |
checkType('makeWikitextError', 1, msg, 'string') |
||
yesno = require('Module:Yesno') |
yesno = require('Module:Yesno') |
||
mCategoryHandler = require('Module:Category handler') |
|||
local errorCategory = 'Hatnote templates with errors' |
local errorCategory = 'Hatnote templates with errors' |
||
local errorCategoryLink |
local errorCategoryLink = string.format( |
||
⚫ | |||
if yesno(demo) then |
|||
⚫ | |||
⚫ | |||
⚫ | |||
else |
|||
) |
|||
⚫ | |||
-- Feed the category link through [[Module:Category handler]] so we can |
|||
⚫ | |||
-- use its blacklist. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
all = errorCategoryLink, |
|||
) |
|||
nocat = demo |
|||
end |
|||
} |
|||
⚫ | |||
return string.format( |
return string.format( |
||
'<strong class="error">Error: %s.</strong>%s', |
'<strong class="error">Error: %s.</strong>%s', |