mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-28 02:00:01 +00:00
Merge "Accept mw.title object as the title argument of frame:expandTemplate()"
This commit is contained in:
commit
1504b474e4
|
@ -398,7 +398,11 @@ local function newFrame( frameId, ... )
|
|||
if opt.title == nil then
|
||||
error( "frame:expandTemplate: a title is required" )
|
||||
else
|
||||
title = tostring( opt.title )
|
||||
if type( opt.title ) == 'table' and opt.title.namespace == 0 then
|
||||
title = ':' .. tostring( opt.title )
|
||||
else
|
||||
title = tostring( opt.title )
|
||||
end
|
||||
end
|
||||
local args
|
||||
if opt.args == nil then
|
||||
|
|
Loading…
Reference in a new issue