Content deleted Content added
Andy M. Wang (talk | contribs) return extra |
Andy M. Wang (talk | contribs) italic title |
||
Line 1:
-- This module implements {{italic title}}.
local p = {}
function p.
args = args or {}
frame = frame or mw.getCurrentFrame()
end▼
title = title or mw.title.getCurrentTitle()
local prefix, parentheses = mw.ustring.match(title.text, '^(.+) (%([^%(%)]+%))$')
function p.speed_of_sound(frame)▼
local result
if prefix and parentheses and args.all ~= 'yes' then
result = string.format("<i>%s</i> %s", prefix, parentheses)
else
result = string.format("<i>%s</i>", title.text)
}▼
end
if
result = title.nsText:gsub('_', ' ') .. ':' .. result
end
return frame:callParserFunction('DISPLAYTITLE', result, args[1])
▲end
local args = require('Module:Arguments').getArgs(frame, {
wrappers = 'Template:Italic title'
▲ })
return '<noinclude>' .. p._main(args, frame) .. '</noinclude>'
end
|