Changes
use the blacklist from Module:Category handler in the makeWikitextError function
local mArguments -- lazily initialise [[Module:Arguments]]
local yesno -- lazily initialise [[Module:Yesno]]
local mCategoryHandler -- lazily initialise [[Module:Category handler]]
local p = {}
checkType('makeWikitextError', 1, msg, 'string')
yesno = require('Module:Yesno')
mCategoryHandler = require('Module:Category handler')
local errorCategory = 'Hatnote templates with errors'
local errorCategoryLink if yesno(demo) then errorCategoryLink = '' else errorCategoryLink = string.format( '[[%s:%s]]', mw.site.namespaces[14].name, errorCategory ) -- Feed the category link through [[Module:Category handler]] so we can -- use its blacklist. errorCategoryLink = mCategoryHandler.main{ all = errorCategoryLink, )nocat = demo } enderrorCategoryLink = errorCategoryLink or ''
return string.format(
'<strong class="error">Error: %s.</strong>%s',