X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FPreprocessor_Hash.php;h=deaf2882bd3bbae713a36ce2a139bab0885ee547;hb=8e07e474b595337fd6cb493f0d0e2a28305f6064;hp=c2ab54e00daf3fdcef34095b8dc78a34a3b18460;hpb=e92d87c26c408441d8c229fc1e9c7e0bcd93898a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php index c2ab54e00d..deaf2882bd 100644 --- a/includes/parser/Preprocessor_Hash.php +++ b/includes/parser/Preprocessor_Hash.php @@ -440,9 +440,7 @@ class Preprocessor_Hash implements Preprocessor { $extNode->addChild( PPNode_Hash_Tree::newWithText( 'close', $close ) ); } $accum->addNode( $extNode ); - } - - elseif ( $found == 'line-start' ) { + } elseif ( $found == 'line-start' ) { // Is this the start of a heading? // Line break belongs before the heading element in any case if ( $fakeLineStart ) { @@ -1065,14 +1063,12 @@ class PPFrame_Hash implements PPFrame { || ( $flags & PPFrame::STRIP_COMMENTS ) ) { $out .= ''; - } - # Add a strip marker in PST mode so that pstPass2() can run some old-fashioned regexes on the result - # Not in RECOVER_COMMENTS mode (extractSections) though - elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) { + } elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) { + # Add a strip marker in PST mode so that pstPass2() can run some old-fashioned regexes on the result + # Not in RECOVER_COMMENTS mode (extractSections) though $out .= $this->parser->insertStripItem( $contextNode->firstChild->value ); - } - # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove - else { + } else { + # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove $out .= $contextNode->firstChild->value; } } elseif ( $contextNode->name == 'ignore' ) { @@ -1389,6 +1385,7 @@ class PPTemplateFrame_Hash extends PPFrame_Hash { $s .= '}'; return $s; } + /** * Returns true if there are no arguments in this frame *