Module:Annotated link: Difference between revisions

Content deleted Content added
adding handling of redlink reporting by Module:GetShortDescription resulting in addition of Category:Pages displaying redlinks processed by Module:AnnotatedLink if true
adding |red_cat= handling i.e. ability to disable categorisation of annotations for redlinks
Line 158:
if isEmpty( short_description ) then return result end
-- If Module:GetShortDescription indicates that name is for a nonexistent page; redlink will be true and there will be no short_description.
if redlink then
-- ReturnIf the invocation has not stated a value for red_cat; return the annotation we have thusfar with an appended maintenance category.
if redlinkisEmpty( args.red_cat ) then return result .. '[[Category:Pages displaying redlinks processed by Module:AnnotatedLink]]' end
return result
end
short_description = handleFirstLetterCase( short_description, args.desc_first_letter_case )
if notisEmpty( args.space_cat ) and not short_description:match( ' ' ) then
short_description = short_description .. '[[Category:Pages displaying short descriptions with no spaces via Module:AnnotatedLink]]'
end