|
|
(9 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| {{#if: {{{legend|}}} | ED{{{equave|o}}}]]s: }}{{#regex: {{{1|}}}|/(\d+)(\D+)?/|[[\1ed{{{equave|o}}}|\1]]\2}}<noinclude> | | <includeonly>{{#switch: {{{legend|}}}|1=[[EDO]]s: |0=EDOs: }}{{#if: {{{1|}}}|{{#rreplace: {{{1}}}|/(\d+)(\D+)?/|[[\1edo|\1]]\2}}|}}</includeonly><noinclude> |
| | | {{documentation}} |
| This template takes a collection of numbers and creates links to individual [[edo]] pages from it.
| |
| | |
| == Usage examples ==
| |
| | |
| ; You type:
| |
| * <code><nowiki>{{EDOs|1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}</nowiki></code>
| |
| * <code><nowiki>{{EDOs|1 2 3 4 5 6 7 8 9 10 11}}</nowiki></code>
| |
| * <code><nowiki>{{EDOs|1 edo, 2 edo, up to 99 edo 00}}</nowiki></code>
| |
| | |
| ; You get (rendered):
| |
| * {{EDOs|1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}
| |
| * {{EDOs|1 2 3 4 5 6 7 8 9 10 11}}
| |
| * {{EDOs|1 edo, 2 edo, up to 99 edo 00}} - disputable if leading zeros should be removed
| |
| | |
| ; To include a legend, type:
| |
| * <code><nowiki>{{EDOs| legend=1 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}</nowiki></code>
| |
| | |
| ; So you get (rendered):
| |
| * [[EDO]]s: {{EDOs|1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}
| |
| | |
| == Technical notes ==
| |
| | |
| * [https://www.mediawiki.org/wiki/Extension:Regex_Fun Extension:Regex Fun - MediaWiki]
| |
| | |
| [[Category:Templates]]
| |
|
| |
|
| | [[Category:Formatting templates]] |
| </noinclude> | | </noinclude> |