Tiny clean up of Parser::doQuotes()
authorPavel Astakhov <pastakhov@yandex.ru>
Mon, 17 Aug 2015 11:13:27 +0000 (17:13 +0600)
committerCscott <cananian@wikimedia.org>
Wed, 19 Aug 2015 21:27:20 +0000 (21:27 +0000)
$firstsingleletterword always is -1 here
because we leave the loop when it's set

Change-Id: I73a430b7ac650bc5919ab95867eec09f723395f2

includes/parser/Parser.php

index 65d8182..1b7c9a0 100644 (file)
@@ -1613,12 +1613,10 @@ class Parser {
                                                        $firstspace = $i;
                                                }
                                        } elseif ( $x2 === ' ' ) {
-                                               if ( $firstsingleletterword == -1 ) {
-                                                       $firstsingleletterword = $i;
-                                                       // if $firstsingleletterword is set, we don't
-                                                       // look at the other options, so we can bail early.
-                                                       break;
-                                               }
+                                               $firstsingleletterword = $i;
+                                               // if $firstsingleletterword is set, we don't
+                                               // look at the other options, so we can bail early.
+                                               break;
                                        } else {
                                                if ( $firstmultiletterword == -1 ) {
                                                        $firstmultiletterword = $i;