Content deleted Content added
m Protected "Module:AnnotatedLink": Highly visible template: requested at WP:RFPP ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) |
Fred Gandt (talk | contribs) adding handling of redlink reporting by Module:GetShortDescription resulting in addition of Category:Pages displaying redlinks processed by Module:AnnotatedLink if true |
||
Line 77:
local short_description = getShortDescription( {
objectify_alarm = true,
report_redlinks = true,
lang_italic = args.desc_lang_italic,
lang_nocat = args.desc_lang_nocat,
Line 89 ⟶ 90:
} )
local redlink
if type( short_description ) == 'table' then
if short_description.alarm then return short_description.alarm end if short_description.redlink then redlink = true end
end
local is_template = name:match( '^Template:(.+)$' )
Line 153 ⟶ 157:
if isEmpty( short_description ) then return result end
-- If Module:GetShortDescription indicates that name is a nonexistent page; redlink will be true.
-- Return the annotation we have thusfar with an appended maintenance category.
if redlink then return result .. '[[Category:Pages displaying redlinks processed by Module:AnnotatedLink]]' end
short_description = handleFirstLetterCase( short_description, args.desc_first_letter_case )
Line 170 ⟶ 178:
function p.main( frame )
local args = getArgs( frame )
if isEmpty( args ) then return alarmingMessage( 'could not getArgs' ) end -- This really would be alarming
return annotatedLink( args )
end
|