wfProfileIn( __METHOD__ );
// Check cache.
global $wgMemc, $wgPreprocessorCacheThreshold;
wfProfileIn( __METHOD__ );
// Check cache.
global $wgMemc, $wgPreprocessorCacheThreshold;
// Unclosed comment in input, runs to end
$inner = strval( substr( $text, $i ) );
$accum->addNodeWithText( 'comment', $inner );
// Unclosed comment in input, runs to end
$inner = strval( substr( $text, $i ) );
$accum->addNodeWithText( 'comment', $inner );
} else {
// No end tag -- let it run out to the end of the text.
$inner = strval( substr( $text, $tagEndPos + 1 ) );
} else {
// No end tag -- let it run out to the end of the text.
$inner = strval( substr( $text, $tagEndPos + 1 ) );
$part = $piece->getCurrentPart();
// Search back through the input to see if it has a proper close
// Do this using the reversed string since the other solutions (end anchor, etc.) are inefficient
$part = $piece->getCurrentPart();
// Search back through the input to see if it has a proper close
// Do this using the reversed string since the other solutions (end anchor, etc.) are inefficient
$searchStart = $i - $wsLength;
if ( isset( $part->commentEnd ) && $searchStart - 1 == $part->commentEnd ) {
// Comment found at line end
// Search for equals signs before the comment
$searchStart = intval( $part->visualEnd );
$searchStart = $i - $wsLength;
if ( isset( $part->commentEnd ) && $searchStart - 1 == $part->commentEnd ) {
// Comment found at line end
// Search for equals signs before the comment
$searchStart = intval( $part->visualEnd );