r80178 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80177‎ | r80178 | r80179 >
Date:17:30, 13 January 2011
Author:platonides
Status:ok
Tags:
Comment:
Improve a preprocessor comment
Modified paths:
  • /trunk/phase3/includes/parser/Preprocessor_DOM.php (modified) (history)
  • /trunk/phase3/includes/parser/Preprocessor_Hash.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Preprocessor_Hash.php
@@ -272,7 +272,7 @@
273273 // Search backwards for leading whitespace
274274 $wsStart = $i ? ( $i - strspn( $revText, ' ', strlen( $text ) - $i ) ) : 0;
275275 // Search forwards for trailing whitespace
276 - // $wsEnd will be the position of the last space
 276+ // $wsEnd will be the position of the last space (or the '>' if there's none)
277277 $wsEnd = $endPos + 2 + strspn( $text, ' ', $endPos + 3 );
278278 // Eat the line if possible
279279 // TODO: This could theoretically be done if $wsStart == 0, i.e. for comments at
Index: trunk/phase3/includes/parser/Preprocessor_DOM.php
@@ -316,7 +316,7 @@
317317 // Search backwards for leading whitespace
318318 $wsStart = $i ? ( $i - strspn( $revText, ' ', strlen( $text ) - $i ) ) : 0;
319319 // Search forwards for trailing whitespace
320 - // $wsEnd will be the position of the last space
 320+ // $wsEnd will be the position of the last space (or the '>' if there's none)
321321 $wsEnd = $endPos + 2 + strspn( $text, ' ', $endPos + 3 );
322322 // Eat the line if possible
323323 // TODO: This could theoretically be done if $wsStart == 0, i.e. for comments at

Status & tagging log