Template:Code: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
add support for a different final delimiter (currently only "pretty" which gives ", and " before the final item); prettify code a bit |
||
Line 1: | Line 1: | ||
{{ | {{ #vardefine: delimiter | {{ | ||
#vardefine: delimiter | {{ | #switch: {{{delimiter|}}} | ||
#switch: {{{delimiter|}}} | | , | pretty = , | ||
| , = , | | and = and | ||
| and = and | | & = & | ||
| & = & | | or = or | ||
| or = or | | newline = <br/> | ||
| newline = <br/> | | list | list-newline | bullet | * = <br/> | ||
| list | list-newline | bullet | * = <br/> | |||
{{{list-level|**}}} | {{{list-level|**}}} | ||
| none = <nowiki/> | | none = <nowiki/> | ||
| #default = {{{delimiter| }}} | | #default = {{{delimiter| }}} | ||
}} | }} | ||
}}<code>{{{1}}}</code>{{#if: {{{2|}}} | {{#var: delimiter | }}{{ #vardefine: finaldelimiter | {{ #ifeq: {{{delimiter}}} | pretty | , and | {{ #var: delimiter }} }} | ||
}}<code>{{{2 | }}<code>{{{1}}}</code>{{ #if: {{{2|}}} | {{ #var: {{ #if: {{{3|}}} || final }}delimiter }}<code>{{{2}}}</code> | ||
}}<code>{{{3 | }}{{ #if: {{{3|}}} | {{ #var: {{ #if: {{{4|}}} || final }}delimiter }}<code>{{{3}}}</code> | ||
}}<code>{{{4 | }}{{ #if: {{{4|}}} | {{ #var: {{ #if: {{{5|}}} || final }}delimiter }}<code>{{{4}}}</code> | ||
}}<code>{{{5 | }}{{ #if: {{{5|}}} | {{ #var: {{ #if: {{{6|}}} || final }}delimiter }}<code>{{{5}}}</code> | ||
}}<code>{{{6 | }}{{ #if: {{{6|}}} | {{ #var: {{ #if: {{{7|}}} || final }}delimiter }}<code>{{{6}}}</code> | ||
}}<code>{{{7 | }}{{ #if: {{{7|}}} | {{ #var: {{ #if: {{{8|}}} || final }}delimiter }}<code>{{{7}}}</code> | ||
}}<code>{{{8 | }}{{ #if: {{{8|}}} | {{ #var: {{ #if: {{{9|}}} || final }}delimiter }}<code>{{{8}}}</code> | ||
}}<code>{{{9 | }}{{ #if: {{{9|}}} | {{ #var: {{ #if: {{{10|}}} || final }}delimiter }}<code>{{{9}}}</code> | ||
}}<code>{{{10 | }}{{ #if: {{{10|}}} | {{ #var: finaldelimiter }}<code>{{{10}}}</code> | ||
}}<noinclude> | |||
{{shortcut|cd}} | {{shortcut|cd}} | ||
{{documentation}} | {{documentation}} | ||
<!-- Put categories/interwiki on the documentation page --> | <!-- Put categories/interwiki on the documentation page --> | ||
</noinclude> | </noinclude> |
Revision as of 00:27, 14 November 2018
{{{1}}}
Template:Shortcut