Module:GetShortDescription/sandbox: Difference between revisions

Content deleted Content added
cleanup; still testing
testing redirected detection of explicits
Line 68:
local function getShortDescription( args_name, args_name_title_table, title, title_table, fallback )
local contents_of_all_short_description_templates = {}
local redirected
-- Check for short description templates on redirect pages.
Line 73 ⟶ 74:
contents_of_all_short_description_templates = getShortDescriptionTemplates( args_name_title_table )
if contents_of_all_short_description_templates.redlink then return contents_of_all_short_description_templates end
redirected = false
end
if #contents_of_all_short_description_templates < 1 then
contents_of_all_short_description_templates = getShortDescriptionTemplates( title_table )
if notEmpty( redirected ) then redirected = true end
end
Line 140 ⟶ 143:
-- Pop!
local short_description = short_descriptions[ #short_descriptions ].description
if notEmpty( short_description ) then return { explicit = short_description, fellback = fallback, redirected = redirected } end
end