模板:Code

来自SCP: Sharp Wiki

-{}-{{{1}}}

[查看 | 编辑 | 历史 | 刷新]Documentation
Shortcuts
cd

This template is a simplified usage of <code>...</code>. It supports up to 10 parameters; everything will be wrapped by -{}-<code> elements with spaces in between.

An optional parameter {{{delimiter}}} can set the default spacing between elements. Set to -{}-none to remove default spacing.

Note that if the parameter contains a pipe symbol (-{}-|) or an equal sign (-{}-=), you need to surround the parameter value with -{}-< nowiki>...</nowiki>, otherwise they are treated as parameter separators or parameter identifiers, respectively. Alternatively, you can use -{}-{{!}} or {{=}} instead.

Examples[编辑 | 编辑源代码]

  1. {{code|text}}-{}-text
  2. {{code|1|2|3|4|5}}-{}-1 2 3 4 5
  3. {{code|1|2|3|4|5|delimiter=、}}-{}-12345
  4. {{code|1|2|3|4|5|d=pretty}}-{}-1、 2、 3、 4  and  5
  5. {{code|<nowiki>something=one|two|three</nowiki>}}-{}-something=one|two|three
  6. {{code|something{{=}}one{{!}}two{{!}}three}}-{}-something=one|two|three

Note: There is a limit to the number of templates that can be used within a page. On some code-heavy pages, please use this template with caution.

[查看 | 编辑 | 历史 | 刷新]The above documentation is transcluded from 模板:Code/doc.
Cookie帮助我们提供我们的服务。通过使用我们的服务,您同意我们使用cookie。