Content deleted Content added
No edit summary |
No edit summary |
||
Line 1:
require('Module:No globals');
local function tag (frame)
local content = mw.title.new (frame.args[1]):getContent()
local ibox_start = string.find (content, '{{%s*' .. 'Infobox television episode/sandbox')
if not ibox_start then
return 'Infobox television episode/sandbox not found'
Line 13 ⟶ 15:
local template_name = 'Infobox television episode/sandbox'
local template_content = ibox_text:gsub ('{{%s' .. template_name, ''):gsub ('}}$', '')
-- preprocess the template then apply syntax highlighting
return frame:callParserFunction ('#tag:syntaxhighlight', frame:expandTemplate ({title=template_name, args = {template_content}}));
end
|