Module:Wikitext Parsing/doc
![]() | 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. |
Usage
This module is a Proof-Of-Content module to do with the rare processing error involved in functions like Module:Transcluder's getParameters()
. The primary function, EscapeEscapedContent
, will run any content within certain tags (<nowiki>
, <pre>
, <syntaxhighlight>
, <source>
) through mw.text.nowiki and remove HTML comments to avoid raw text being processed, allowing even the most absurd syntax to be parsed through basic means.
The function has a second parameter, keepComments
, which will pass the content of HTML comments through mw.text.nowiki instead of removing them entirely if set to true.
This currently isn't used in any real modules as it's somewhat untested, probably expensive, and definitely excessive, hence the name (if a multi-line nowiki tag is causing you issues, maybe it's the target page's fault, not the module's).
Shortfalls: Currently unsure about the situation of <includeonly>...</includeonly>
and how it's handled during processing, so it isn't handled by the module yet, though this isn't likely to matter much (hopefully). Also, any text processed should consider using mw.text.decode in certain situations, though this will also decode any input that was encoded but not inside a no-processing tag