4,366
edits
(Created page with "<includeonly>{{#if:{{{1|}}}|【|}}{{{1|}}}{{#if:{{{1|}}}|】|}}</includeonly> <noinclude> =Description= Input is text. Output is text surrounded with fancy brackets if the te...") |
|||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{1|}}}|【|}}{{{1|}}}{{#if:{{{1|}}}|】|}}</includeonly> | <includeonly>{{#if:{{{1|}}} | ||
|{{#switch:{{{type|}}}|p=(|b=[|c={|【}}|}}{{{1|}}}{{#if:{{{1|}}}|{{#switch:{{{type|}}}|p=)|b=]|c=}|】}}|}} | |||
</includeonly> | |||
<noinclude> | <noinclude> | ||
=Description= | =Description= | ||
Input is text. Output is text surrounded with fancy brackets if the text is not blank. If the text is blank, it also returns blank. | Input is text. Output is text surrounded with fancy brackets if the text is not blank. If the text is blank, it also returns blank. Can replace | ||
=Usage= | =Usage= | ||
<pre> | |||
{{Flavor text | |||
|<Your text> | |||
|type = p/b/c/(blank) | |||
}} | |||
</pre> | |||
The type parameter is used to change the type of enclosing characters. By default it uses fancy brackets, but setting type=p changes them to parentheses, type=b to brackets, and type=c to curly braces. | |||
==Examples== | ==Examples== | ||
Line 14: | Line 24: | ||
{{Flavor text|Example}} | {{Flavor text|Example}} | ||
<pre>{{Flavor text|Example|type=p}}</pre> | |||
{{Flavor text|Example|type=p}} | |||
<pre>{{Flavor text|Example|type=b}}</pre> | |||
{{Flavor text|Example|type=b}} | |||
<pre>{{Flavor text|Example|type=c}}</pre> | |||
{{Flavor text|Example|type=c}} | |||
<pre>{{Flavor text|}}</pre> | <pre>{{Flavor text|}}</pre> | ||
{{Flavor text|}} | {{Flavor text|}} |
edits