http://www.chalochatu.org/index.php?title=Module:Italic_title&feed=atom&action=historyModule:Italic title - Revision history2024-03-29T01:55:45ZRevision history for this page on the wikiMediaWiki 1.39.3http://www.chalochatu.org/index.php?title=Module:Italic_title&diff=2693&oldid=prevChalochatu: Created page with "-- This module implements {{italic title}}. local p = {} function p._main(args, frame, title) args = args or {} frame = frame or mw.getCurrentFrame() title = title or mw...."2016-06-24T07:21:51Z<p>Created page with "-- This module implements {{italic title}}. local p = {} function p._main(args, frame, title) args = args or {} frame = frame or mw.getCurrentFrame() title = title or mw...."</p>
<p><b>New page</b></p><div>-- This module implements {{italic title}}.<br />
<br />
local p = {}<br />
<br />
function p._main(args, frame, title)<br />
args = args or {}<br />
frame = frame or mw.getCurrentFrame()<br />
title = title or mw.title.getCurrentTitle()<br />
local prefix, parentheses = mw.ustring.match(title.text, '^(.+) (%([^%(%)]+%))$')<br />
local result<br />
if prefix and parentheses and args.all ~= 'yes' then<br />
result = string.format("<i>%s</i> %s", prefix, parentheses)<br />
else<br />
result = string.format("<i>%s</i>", title.text)<br />
end<br />
if title.namespace ~= 0 then<br />
result = title.nsText:gsub('_', ' ') .. ':' .. result<br />
end<br />
return frame:callParserFunction('DISPLAYTITLE', result, args[1])<br />
end<br />
<br />
function p.main(frame)<br />
local args = require('Module:Arguments').getArgs(frame, {<br />
wrappers = 'Template:Italic title'<br />
})<br />
return p._main(args, frame)<br />
end<br />
<br />
return p</div>Chalochatu