Modul:Italic title: Unterschied zwischen den Versionen
Undid revision 560274954 by Mr. Stradivarius (talk) ok, something went wrong there
(add support for all=yes) |
(Undid revision 560274954 by Mr. Stradivarius (talk) ok, something went wrong there) |
||
Zeile 3: | Zeile 3: | ||
local p = {} | local p = {} | ||
function p.main( | function p.main() | ||
local title = mw.title.getCurrentTitle() -- Get the current page object. | local title = mw.title.getCurrentTitle() -- Get the current page object. | ||
-- Find the parts before and after the disambiguation brackets, if any. | -- Find the parts before and after the disambiguation brackets, if any. | ||
Zeile 21: | Zeile 10: | ||
-- italicise the whole title. | -- italicise the whole title. | ||
local result | local result | ||
if prefix and brackets | if prefix and brackets then | ||
result = "''" .. prefix .. "'' " .. brackets | result = "''" .. prefix .. "'' " .. brackets | ||
else | else | ||
Zeile 32: | Zeile 21: | ||
-- Call displaytitle with the text we generated. | -- Call displaytitle with the text we generated. | ||
return mw.getCurrentFrame():callParserFunction( 'DISPLAYTITLE', result ) | return mw.getCurrentFrame():callParserFunction( 'DISPLAYTITLE', result ) | ||
end | end | ||
return p | return p |