jenkins-bot has submitted this change and it was merged.

Change subject: Start formula numbering with 0
......................................................................


Start formula numbering with 0

Change-Id: I70d317b3c5ca4c088da9c4c6574a19e084d14936
---
M includes/MathIdGenerator.php
M tests/MathIdGeneratorTest.php
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Physikerwelt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/MathIdGenerator.php b/includes/MathIdGenerator.php
index 1aeb2e9..d48ccee 100644
--- a/includes/MathIdGenerator.php
+++ b/includes/MathIdGenerator.php
@@ -172,6 +172,6 @@
         */
        private function formatKey( $key ) {
                $keys = $this->getKeys();
-               return sprintf( $this->format, $this->revisionId, $keys[$key] + 
1 );
+               return sprintf( $this->format, $this->revisionId, $keys[$key] );
        }
 }
diff --git a/tests/MathIdGeneratorTest.php b/tests/MathIdGeneratorTest.php
index e4d4a3a..7b0bbed 100644
--- a/tests/MathIdGeneratorTest.php
+++ b/tests/MathIdGeneratorTest.php
@@ -19,8 +19,8 @@
                $id2 = $idGen->guessIdFromContent( 'E=mc^2' );
                $id3 = $idGen->guessIdFromContent( 'E=mc^2' );
                $this->assertEquals( $id1, $id3 );
-               $this->assertNotEquals( $id1, $id2, "1 and 2 shoud not be 
equal" );
-               $this->assertEquals( "math.42.3", $id2 );
+               $this->assertNotEquals( $id1, $id2, "1 and 2 should not be 
equal" );
+               $this->assertEquals( "math.42.2", $id2 );
        }
        /**
         * @outputBuffering disabled
@@ -36,7 +36,7 @@
                $id2 = $idGen->guessIdFromContent( 'E=mc^2' );
                $id3 = $idGen->guessIdFromContent( 'E=mc^2' );
                $this->assertEquals( $id1, $id3 );
-               $this->assertNotEquals( $id1, $id2, "1 and 2 shoud not be 
equal" );
+               $this->assertNotEquals( $id1, $id2, "1 and 2 should not be 
equal" );
                $this->assertEquals( "CustomId", $id2 );
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/261630
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I70d317b3c5ca4c088da9c4c6574a19e084d14936
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Dyiop <[email protected]>
Gerrit-Reviewer: Hcohl <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: Whyameri <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to