模板:If/doc:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
创建页面,内容为“The functions provided by MediaWiki's stock ParserFunctions extension with names starting with "#if" trim spaces and newlines from the "then" and "else" parts. '''This mediawiki.org template is a wrapper''' easing their use in a way that '''prevents such trimming'''. Spaces still do not affect the outcome of the condition. Parameter 1 selects the if-type as "eq", "expr", "e…”
 
Kangkk​(留言 | 贡献)
无编辑摘要
 
第1行: 第1行:
[[Help:Extension:ParserFunctions|The functions provided by MediaWiki's stock ParserFunctions extension]] with names starting with "#if" [[Manual:Newlines and spaces#Trimming on expansion|trim spaces and newlines]] from the "then" and "else" parts. '''This mediawiki.org template is a wrapper''' easing their use in a way that '''prevents such trimming'''.
The functions provided by MediaWiki's stock ParserFunctions extension with names starting with "#if" [[Manual:Newlines and spaces#Trimming on expansion|trim spaces and newlines]] from the "then" and "else" parts. '''This mediawiki.org template is a wrapper''' easing their use in a way that '''prevents such trimming'''.


Spaces still do not affect the outcome of the condition. Parameter 1 selects the if-type as "eq", "expr", "exist" or "error" (for #iferror), or empty "||" for a simple if-there (for #if). The template can be repeatedly nested 6 or 7 levels, one inside the other, because the outer-most is completed before running either the then/else inner levels.
Spaces still do not affect the outcome of the condition. Parameter 1 selects the if-type as "eq", "expr", "exist" or "error" (for #iferror), or empty "||" for a simple if-there (for #if). The template can be repeatedly nested 6 or 7 levels, one inside the other, because the outer-most is completed before running either the then/else inner levels.