Search results
Results from the WOW.Com Content Network
Wikitext to parse.-- @return Sequence of templates. function WikitextParser. getTemplates (wikitext) local templates = {} for template in wikitext: gmatch ('{%b{}}') do if wikitext: sub (1, 3) ~= '{{#' then-- skip parser functions like #if table.insert (templates, template) end end return templates end-- Get the requested template from the ...
This module provides some functions to help with the potential complex situation involved in modules like Module:Template parameter value, which intend to process the raw wikitext of a page and want to respect nowiki tags or similar reliably. This module is designed only to be called by other modules.
This module is subject to page protection.It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing.
Magic words (including parser functions, variables and behavior switches) are features of wiki markup that give instructions to Wikipedia's underlying MediaWiki software. For example, magic words can suppress or position the table of contents, disable indexing by external search engines, and produce output dynamically based on the current page or on user-defined conditional logic.
The module is just a container for the functions, and doesn't do anything by itself. So there are two reasons that we need to input a function name: we can't run a module by itself, and without specifying a function name, Lua will not know which function it is we want to run. The simplest way to run a module from a wiki page is like this:
This is a documentation subpage for Module:Wikitext Parsing. It may contain usage information, categories and other content that is not part of the original module page. This Lua module is used on approximately 17,400,000 pages, or roughly 28% of all pages .
--Go to the talk page to see the results of the tests--Consider making sure that other modules that rely heavily on this module (E.g. [[Module:Template parameter value]]) also pass their testcases local p = require ('Module:UnitTests') local frame = mw. getCurrentFrame local function preprocess (text, IsPrepared) local content = mw. text. unstrip (frame: preprocess (text)) if IsPrepared then ...
Main page; Contents; Current events; Random article; About Wikipedia; Contact us