Template:EDTs: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Change regex rule for more complex wart notation. This also fixes numbers (e.g. "ed3") not being included as part of the link.
Add slash to the pattern for fraction notation (e.g. ed3/1)
 
Line 1: Line 1:
<includeonly>{{#switch: {{{legend|}}}|1=[[EDT]]s:&nbsp;|0=EDTs:&nbsp;}}{{#rreplace: {{{1|}}}|/(\d+)([\w\*†′″]*)/|[[\1edt|\1\2]]}}</includeonly><noinclude>
<includeonly>{{#switch: {{{legend|}}}|1=[[EDT]]s:&nbsp;|0=EDTs:&nbsp;}}{{#rreplace: {{{1|}}}|/(\d+)([\w\*\/†′″]*)/|[[\1edt|\1\2]]}}</includeonly><noinclude>
{{Documentation}}
{{Documentation}}


[[Category:Formatting templates]]
[[Category:Formatting templates]]
</noinclude>
</noinclude>

Latest revision as of 17:45, 13 October 2026

Template documentation[view] [edit] [history] [purge]
This template should not be substituted.

The EDTs template takes a collection of numbers and creates links to individual edt pages from it. Alphanumeric characters (e.g. edt) immediately after a number are included in the link, as well as asterisk (*), slash (/), dagger (†), prime (′) and double-prime (″) to help with fraction notation and extended wart notation.

Usage examples

You type
  • {{EDTs| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}
  • {{EDTs| 1 2 3 4 5 6 7 8 9 10 11 }}
  • {{EDTs| 1edt, 2edt, up to 99edt }}
You get (rendered)
To include a legend, type
  • {{EDTs|legend=0| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}
  • {{EDTs|legend=1| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}
So you get (rendered)

Technical notes

This template calls Extension: RegexFunctions to match the strings.

See also