Module:Lockbox/sandbox: Difference between revisions

Content deleted Content added
use title objects to make page-name parsing more robust
we need to trim the items for mw.title.new
Line 62:
-- Generate transclusions to the templates, and build the output.
for i, item in ipairs(frame.args) do
item = mw.text.trim(item)
local title = mw.title.new(item)
if title then
Line 70 ⟶ 71:
-- colon, assume it is a mainspace page. Otherwise, assume it is
-- a template.
if item:findsub(1, 1) == '^%s*:') then
generate_transclusion(title)
output[#output + 1] = '* [[' .. prefixed_text .. ']]'