Index: trunk/phase3/includes/Parser.php |
— | — | @@ -1443,10 +1443,10 @@ |
1444 | 1444 | |
1445 | 1445 | if ( $this->mOutputType == OT_HTML ) { |
1446 | 1446 | # Argument substitution |
1447 | | - $text = preg_replace_callback( "/(\\n?){{{([$titleChars]*?)}}}/", 'wfArgSubstitution', $text ); |
| 1447 | + $text = preg_replace_callback( "/{{{([$titleChars]*?)}}}/", 'wfArgSubstitution', $text ); |
1448 | 1448 | } |
1449 | 1449 | # Template substitution |
1450 | | - $regex = '/(\\n?){{(['.$nonBraceChars.']*)(\\|.*?|)}}/s'; |
| 1450 | + $regex = '/{{(['.$nonBraceChars.']*)(\\|.*?|)}}/s'; |
1451 | 1451 | $text = preg_replace_callback( $regex, 'wfBraceSubstitution', $text ); |
1452 | 1452 | |
1453 | 1453 | array_pop( $this->mArgStack ); |
— | — | @@ -1502,15 +1502,13 @@ |
1503 | 1503 | |
1504 | 1504 | $title = NULL; |
1505 | 1505 | |
1506 | | - # $newline is an optional newline character before the braces |
1507 | 1506 | # $part1 is the bit before the first |, and must contain only title characters |
1508 | 1507 | # $args is a list of arguments, starting from index 0, not including $part1 |
1509 | 1508 | |
1510 | | - $newline = $matches[1]; |
1511 | | - $part1 = $matches[2]; |
1512 | | - # If the third subpattern matched anything, it will start with | |
| 1509 | + $part1 = $matches[1]; |
| 1510 | + # If the second subpattern matched anything, it will start with | |
1513 | 1511 | |
1514 | | - $args = $this->getTemplateArgs($matches[3]); |
| 1512 | + $args = $this->getTemplateArgs($matches[2]); |
1515 | 1513 | $argc = count( $args ); |
1516 | 1514 | |
1517 | 1515 | # {{{}}} |
— | — | @@ -1719,8 +1717,7 @@ |
1720 | 1718 | |
1721 | 1719 | # Triple brace replacement -- used for template arguments |
1722 | 1720 | function argSubstitution( $matches ) { |
1723 | | - $newline = $matches[1]; |
1724 | | - $arg = trim( $matches[2] ); |
| 1721 | + $arg = trim( $matches[1] ); |
1725 | 1722 | $text = $matches[0]; |
1726 | 1723 | $inputArgs = end( $this->mArgStack ); |
1727 | 1724 | |