Template:Expand wikitext/doc: Difference between revisions
Content added Content deleted
(→See also: Add Template:Make code) |
(No difference)
|
Revision as of 17:35, 5 September 2024
Not to be confused with Template:Eval.
This is a documentation subpage for Template:Expand wikitext. It contains usage information, categories and other content that is not part of the original Template page. |
This template is used on many pages. To avoid large-scale disruption and unnecessary server load, any changes to this template should first be tested in its /sandbox or /testcases subpages or in your own user subpage. The tested changes can then be added to this page in one single edit. Please consider discussing any changes on the talk page before implementing them. |
Uses Lua: |
Interprets the input as wikitext using the frame:preprocess
function. Any arguments passed to {{Expand wikitext }} are available in the preprocessed code, letting this be used as a rudimentary way of using variables.
If the entire input is in a nowiki tag, or if the optional parameter |unstrip=yes
is specified, first extracts the contents of nowiki tags before preprocessing.
Example
{{Expand wikitext|{{Make code|<<As of!2015!02>>}}}}
→ Script error: No such module "Expand wikitext".<table>{{Expand wikitext|<nowiki>{{Episode list/sublist | 1 = One Piece (season 15) | EpisodeNumber = {{{ep}}} | Title = An Explosive Situation! Luffy vs. Fake Luffy! | OriginalAirDate = {{Date|2011-10-02 +{{#expr:({{{ep}}})-517}} weeks }} }} </nowiki>|ep=518}}</table>
→
{{Expand wikitext|<nowiki>{{2x|x}}-</nowiki>}}
→ Script error: No such module "Expand wikitext".{{Expand wikitext|<nowiki>{{2x|x}} -</nowiki>}}
→ Script error: No such module "Expand wikitext".{{Expand wikitext|<nowiki><u>u</u><ref>text</ref></nowiki>}}
→ Script error: No such module "Expand wikitext".
See also
- {{Make code }}
- {{Call wikitext }} - Always unstrips nowiki tags and uses
|sourceCode=
to avoid parameter overlap