Template:EDOs: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Xenwolf (talk | contribs)
looks great :-)
Xenwolf (talk | contribs)
added another parameter
Line 1: Line 1:
{{#regex: {{{1|}}}|/(\d+)(\D+)?/|[[\1edo|\1]]\2}}<noinclude>
{{#if: {{{legend|}}} | [[EDO]]s: }}{{#regex: {{{1|}}}|/(\d+)(\D+)?/|[[\1edo|\1]]\2}}<noinclude>


This template takes a collection of numbers and creates links to individual [[edo]] pages from it.
This template takes a collection of numbers and creates links to individual [[edo]] pages from it.
Line 5: Line 5:
== Usage examples ==
== Usage examples ==


; You type
; 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 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>
* <code><nowiki>{{EDOs|1 edo, 2 edo, up to 99 edo 00}}</nowiki></code>


; You get (rendered)
; 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 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
* {{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 ==
== Technical notes ==

Revision as of 14:25, 29 November 2020

{{#regex: |/(\d+)(\D+)?/|\1\2}}

This template takes a collection of numbers and creates links to individual edo pages from it.

Usage examples

You type
  • {{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}}
You get (rendered)
  • {{#regex: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11|/(\d+)(\D+)?/|\1\2}}
  • {{#regex: 1 2 3 4 5 6 7 8 9 10 11|/(\d+)(\D+)?/|\1\2}}
  • {{#regex: 1 edo, 2 edo, up to 99 edo 00|/(\d+)(\D+)?/|\1\2}} - disputable if leading zeros should be removed
To include a legend, type
  • {{EDOs| legend=1 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}
So you get (rendered)
  • EDOs: {{#regex: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11|/(\d+)(\D+)?/|\1\2}}

Technical notes