Module:Extract short description: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 15:
local template_name = 'Infobox television episode/sandbox'
local template_content = ibox_text:gsub ('{{%s' .. template_name, ''):gsub ('}}$', '')
 
-- preprocess the template and return shortdescription text or empty string
return (frame:expandTemplate ({title=template_name, args = {template_content}}):match ('<div[^>]-class="shortdescription.->([^<]+)')) or ''
-- preprocess the template then apply syntax highlighting
-- return frame:callParserFunction ('#tag:syntaxhighlight', frame:expandTemplate ({title=template_name, args = {template_content}}));
end