Template:Samp

From NeuroWiki
Revision as of 12:29, 1 November 2024 by Selfice (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
[ View | Edit | History | Purge ]Documentation page

This template uses Module:Array, this script is written in Lua.
For more details, please refer to Wikipedia:Lua and Extension:Scribunto.

此模板是<samp>...</samp>的简化用法。它支持任意多个参数;所有内容都将由<samp>元素包装。

可设置一个可选的|delimiter=参数,以指定每个元素之间的默认空间。

注意,如果参数包含管道符号(|)或等号(=),则需要在参数值周围加上<nowiki>...</nowiki>,否则它们将分别被视为参数分隔符或参数标识符。另外,你也可以改用{{!}}&#124;-{}-{{=}}&#61;代替。

示例

  1. {{samp|text}} – text
  2. {{2:samp|1}} – 12345
  3. {{2:samp|1}} – 12345
  4. {{2:samp|1}} – 1, 2, 3, 4 and 5
  5. {{two:samp|<nowiki>something=one}} – something=one|two|three
  6. {{samp|something{{=}}one{{!}}two&#124;three}} – something=one|two|three
[ View | Edit | History | Purge ]The above documentation is transcluded from Template:Samp/doc.