Modul:Text: Unterschied zwischen den Versionen
Noémi (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Noémi (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
| Zeile 20: | Zeile 20: | ||
function p.sfGenerateForm(frame) | function p.sfGenerateForm(frame) | ||
return '<pre>' .. mw.text. | return '<pre>' .. mw.text.nowiki(mw.text.unstripNoWiki(tostring(Class:sfGenerateForm()))) .. '</pre>' | ||
end | end | ||
Version vom 17. Dezember 2017, 19:11 Uhr
| This module is rated as ready for general use. It has reached a mature form and is thought to be bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing. |
This module provides access to various lua functions from the mw.text library. See corresponding lua manual entries for more information.
{{#invoke:Text|function_name|args}}
See also
- Module:String for accessing functions of the string library
local p = {}
local Class = require('Module:Text/class')
local getArgs = require('Module:Arguments').getArgs
function p.categorize(frame)
return tostring(Class:categorize())
end
function p.categoryPage(frame)
return tostring(Class:categoryPage())
end
function p.explainDataStore(frame)
return tostring(Class:explainDataStore())
end
function p.gardeningCategoryPage(frame)
return tostring(Class:gardeningCategoryPage())
end
function p.sfGenerateForm(frame)
return '<pre>' .. mw.text.nowiki(mw.text.unstripNoWiki(tostring(Class:sfGenerateForm()))) .. '</pre>'
end
function p.sfGenerateFormEntry(frame)
return '<pre>' .. mw.text.nowiki(tostring(Class:sfGenerateFormEntry())) .. '</pre>'
end
function p.sfGenerateFormLink(frame)
return tostring(Class:sfGenerateFormLink())
end
function p.templateDocumentation(frame)
return tostring(Class:templateDocumentation())
end
function p.main(frame)
local args = getArgs(frame)
local me = Class:new(mw.title.getCurrentTitle().prefixedText)
me:initFromArgs(args)
me:storeData()
me:addInfobox()
me:addPageBody()
return me:render()
end
return p