Template:EDTs: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
ArrowHead294 (talk | contribs)
No edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 1: Line 1:
{{#if: {{{legend|}}} | [[edt]]s:&nbsp;}}{{#regex: {{{1|}}}|/(\d+)(\D+)?/|[[\1edt|\1]]\2}}<noinclude>
{{#if: {{{legend|}}} | [[edt]]s:&nbsp;}}{{#regex: {{{1|}}}|/(\d+)(\D+)?/|[[\1edt|\1]]\2}}<noinclude>
This template takes a collection of numbers and creates links to individual [[edt]] pages from it.
{{documentation}}
 
{{doc}}


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

Revision as of 18:28, 30 January 2025

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

Template documentation[view] [edit] [history] [purge]

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

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|1, 3 and 12, but notably not 7}}
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, 3 and 12, but notably not 7|/(\d+)(\D+)?/|\1\2}}
To include a legend, type
  • {{EDTs|legend=1| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }}
So you get (rendered)
  • edts: {{#regex: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11|/(\d+)(\D+)?/|\1\2}}

Technical notes

See also