Template:Dash/doc

Revision as of 04:14, 12 May 2024 by ArrowHead294 (talk | contribs) (Created page with "<includeonly><hr><small>Documentation transcluded from /doc</small></includeonly> This template converts a sequence separated by spaces into one separated by dashes. ===...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template converts a sequence separated by spaces into one separated by dashes.

Usage

The list to be converted is passed as one unnamed argument, using a comma and one or more spaces (, ) as the separator.

To adjust spacing between list elements and dashes, use the spaces parameter (defaults to the regular space character).

You pass You get
spaces=space Regular space
spaces=
spaces=thin Thin space (U+2009 THIN SPACE)
spaces=hair Hair space (U+200A HAIR SPACE)

The dash used can be the regular hyphen-minus, an em dash, or an en dash. This is done with the sep parameter.

You pass You get
sep= -
sep=mdash Em dash (U+2014 — EM DASH)
sep=ndash En dash (U+2013 – EN DASH)

Examples

You type You get
{{dash|A, B, C, D, E, F, G, H|spaces=space|sep=mdash}}
A – B – C – D – E – F – G – H
{{dash|A, B, C, D, E, F, G, H|spaces=thin|sep=mdash}}
A – B – C – D – E – F – G – H
{{dash|A, B, C, D, E, F, G, H|spaces=hair|sep=mdash}}
A – B – C – D – E – F – G – H
{{dash|A, B, C, D, E, F, G, H|spaces=space|sep=ndash}}
A – B – C – D – E – F – G – H
{{dash|A, B, C, D, E, F, G, H|spaces=thin|sep=ndash}}
A – B – C – D – E – F – G – H
{{dash|A, B, C, D, E, F, G, H|spaces=hair|sep=ndash}}
A – B – C – D – E – F – G – H
{{dash|A, B, C, D, E, F, G, H|spaces=space|sep=}}
A – B – C – D – E – F – G – H
{{dash|A, B, C, D, E, F, G, H|spaces=thin|sep=}}
A – B – C – D – E – F – G – H
{{dash|A, B, C, D, E, F, G, H|spaces=hair|sep=}}
A – B – C – D – E – F – G – H