-- This module implements {{italic title}}.localp={}functionp.main(frame)localargs=require('Module:Arguments').getArgs(frame,{wrappers='Template:Italic title'})localtitle=mw.title.getCurrentTitle()-- Find the parts before and after the disambiguation parentheses, if any.localprefix,parentheses=mw.ustring.match(title.text,'^(.+) (%([^%(%)]+%))$')-- If parentheses were found, italicise only the part before them. Otherwise-- italicise the whole title.localresultifprefixandparenthesesandargs.all~='yes'thenresult="''"..prefix.."'' "..parentheseselseresult="''"..title.text.."''"end-- Add the namespace if we're not in mainspace.iftitle.namespace~=0thenresult=mw.site.namespaces[title.namespace].name..':'..resultend-- Call displaytitle with the text we generated.returnmw.getCurrentFrame():callParserFunction('DISPLAYTITLE',result,args[1])endreturnp