More occurrence typos
authorSam Reed <reedy@users.mediawiki.org>
Mon, 19 Mar 2012 21:40:39 +0000 (21:40 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 19 Mar 2012 21:40:39 +0000 (21:40 +0000)
includes/parser/Parser.php
resources/jquery/jquery.highlightText.js
tests/phpunit/includes/IPTest.php

index e09e757..cff7217 100644 (file)
@@ -1700,7 +1700,7 @@ class Parser {
 
                $holders = new LinkHolderArray( $this );
 
-               # split the entire text string on occurences of [[
+               # split the entire text string on occurrences of [[
                $a = StringUtils::explode( '[[', ' ' . $s );
                # get the first element (all text up to first [[), and remove the space we added
                $s = $a->current();
@@ -2384,7 +2384,7 @@ class Parser {
        }
 
        /**
-        * Split up a string on ':', ignoring any occurences inside tags
+        * Split up a string on ':', ignoring any occurrences inside tags
         * to prevent illegal overlapping.
         *
         * @param $str String the string to split
index 44ac56e..42b1194 100644 (file)
@@ -23,7 +23,7 @@ $.highlightText = {
                        // TODO - need to be smarter about the character matching here. 
                        // non latin characters can make regex think a new word has begun: do not use \b
                        // http://stackoverflow.com/questions/3787072/regex-wordwrap-with-utf8-characters-in-js
-                       // look for an occurence of our pattern and store the starting position
+                       // look for an occurrence of our pattern and store the starting position
                        var match = node.data.match( new RegExp( "(^|\\s)" + $.escapeRE( pat ), "i" ) );
                        if ( match ) {
                                var pos = match.index + match[1].length; // include length of any matched spaces
index 4397b87..e38fa7e 100644 (file)
@@ -14,9 +14,9 @@ class IPTest extends MediaWikiTestCase {
                $this->assertFalse( IP::isIPAddress( "" ), 'Empty string is not an IP' );
                $this->assertFalse( IP::isIPAddress( 'abc' ), 'Garbage IP string' );
                $this->assertFalse( IP::isIPAddress( ':' ), 'Single ":" is not an IP' );
-               $this->assertFalse( IP::isIPAddress( '2001:0DB8::A:1::1'), 'IPv6 with a double :: occurence' );
-               $this->assertFalse( IP::isIPAddress( '2001:0DB8::A:1::'), 'IPv6 with a double :: occurence, last at end' );
-               $this->assertFalse( IP::isIPAddress( '::2001:0DB8::5:1'), 'IPv6 with a double :: occurence, firt at beginning' );
+               $this->assertFalse( IP::isIPAddress( '2001:0DB8::A:1::1'), 'IPv6 with a double :: occurrence' );
+               $this->assertFalse( IP::isIPAddress( '2001:0DB8::A:1::'), 'IPv6 with a double :: occurrence, last at end' );
+               $this->assertFalse( IP::isIPAddress( '::2001:0DB8::5:1'), 'IPv6 with a double :: occurrence, firt at beginning' );
                $this->assertFalse( IP::isIPAddress( '124.24.52' ), 'IPv4 not enough quads' );
                $this->assertFalse( IP::isIPAddress( '24.324.52.13' ), 'IPv4 out of range' );
                $this->assertFalse( IP::isIPAddress( '.24.52.13' ), 'IPv4 starts with period' );