Template:MoinMarkup/ParserSection
<onlyinclude>{{#switch: {{{Parser|}}}
| wiki = <div class="{{{ArgStr|}}}">{{{Output|}}}</div>
| bash
| irc
| python
| shell
| Makefile
| sh
| perl
| cplusplus
| diff
| html
| make
| makefile = <syntaxhighlight lang="{{{Parser|}}}" {{#if:{{{ArgNumbers|}}}||line}}>{{{Content|}}}</syntaxhighlight>
| highlight = <syntaxhighlight lang="{{{ArgStr|}}}" {{#if:{{{ArgNumbers|}}}||line}}>{{{Content|}}}</syntaxhighlight>
| csv = {{{Output|}}} <!-- TODO: CSV highlighting -->
}}{{Template:MoinMarkup/Boilerplate}}
</onlyinclude>
Please do not create new instances of this template.
When this wiki was converted from MoinMoin, we used MoinMarkup templates to represent anything that didn't translate neatly between the two formats. The goal is to gradually replace these with native MediaWiki equivalents.
The program that converted the old MoinMoin source always passes a unique MoinMarkupID= value as the first parameter, and the same value in MoinMarkupID2= as the last parameter. If you want to mass-edit every instance of this template (e.g. with the Replace Text extension), you should be able to search for something like {{MoinMarkup/ParserSection|MoinMarkupID=(\d+)(.*)|MoinMarkupID2=\1}}.
Parser section from a MoinMoin page
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| MoinMarkupID | MoinMarkupID | Unique ID for this template on the page, must be the first parameter. | Number | deprecated |
| Content | Content | raw MoinMoin source | String | deprecated |
| Parser | Parser | Name of the parser
| Line | deprecated |
| ArgStr | ArgStr | Argument string passed to the parser. Suggested values are for the wiki parser, where this indicates the element's class
| Line | deprecated |
| ArgNumbers | ArgNumbers | For the highlight parser, indicates whether numbers are shown. 'off' means 'hide line numbers but show a toggle button', 'disable' means 'hide line numbers and toggle button'.
| Line | deprecated |
| ArgDelimiter | ArgDelimiter | For the csv parser, this indicates the character to separate values.
| Line | deprecated |
| Output | Output | wikitext resembling MoinMoin's rendered output | Content | deprecated |
| MoinMarkupID2 | MoinMarkupID2 | Same value as MoinMarkupID=, guaranteed to be the last parameter | Number | deprecated |
Some notes about this template:
- this treats any value for ArgNumbers as disabling line numbers
- numbers=no isn't supported by MoinMoin, but it's easier to just honour the author's intent
- some pages use numbers=disable or numbers=off to work around the fact that MoinMoin's line-numbering breaks copy+paste - those pages might look OK with MediaWiki line-numbering
- #!important and #!note occur in the list of common parsers, which includes older revisions