From daa4e524b7b6d36e87fced87e2ce379f0cf137c8 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 19 Mar 2012 21:40:39 +0000 Subject: [PATCH] More occurrence typos --- includes/parser/Parser.php | 4 ++-- resources/jquery/jquery.highlightText.js | 2 +- tests/phpunit/includes/IPTest.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index e09e757a12..cff7217782 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -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 diff --git a/resources/jquery/jquery.highlightText.js b/resources/jquery/jquery.highlightText.js index 44ac56e145..42b1194641 100644 --- a/resources/jquery/jquery.highlightText.js +++ b/resources/jquery/jquery.highlightText.js @@ -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 diff --git a/tests/phpunit/includes/IPTest.php b/tests/phpunit/includes/IPTest.php index 4397b87971..e38fa7e43c 100644 --- a/tests/phpunit/includes/IPTest.php +++ b/tests/phpunit/includes/IPTest.php @@ -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' ); -- 2.20.1