r114192 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114191‎ | r114192 | r114193 >
Date:21:40, 19 March 2012
Author:reedy
Status:ok
Tags:
Comment:
More occurrence typos
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)
  • /trunk/phase3/resources/jquery/jquery.highlightText.js (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/IPTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/IPTest.php
@@ -14,9 +14,9 @@
1515 $this->assertFalse( IP::isIPAddress( "" ), 'Empty string is not an IP' );
1616 $this->assertFalse( IP::isIPAddress( 'abc' ), 'Garbage IP string' );
1717 $this->assertFalse( IP::isIPAddress( ':' ), 'Single ":" is not an IP' );
18 - $this->assertFalse( IP::isIPAddress( '2001:0DB8::A:1::1'), 'IPv6 with a double :: occurence' );
19 - $this->assertFalse( IP::isIPAddress( '2001:0DB8::A:1::'), 'IPv6 with a double :: occurence, last at end' );
20 - $this->assertFalse( IP::isIPAddress( '::2001:0DB8::5:1'), 'IPv6 with a double :: occurence, firt at beginning' );
 18+ $this->assertFalse( IP::isIPAddress( '2001:0DB8::A:1::1'), 'IPv6 with a double :: occurrence' );
 19+ $this->assertFalse( IP::isIPAddress( '2001:0DB8::A:1::'), 'IPv6 with a double :: occurrence, last at end' );
 20+ $this->assertFalse( IP::isIPAddress( '::2001:0DB8::5:1'), 'IPv6 with a double :: occurrence, firt at beginning' );
2121 $this->assertFalse( IP::isIPAddress( '124.24.52' ), 'IPv4 not enough quads' );
2222 $this->assertFalse( IP::isIPAddress( '24.324.52.13' ), 'IPv4 out of range' );
2323 $this->assertFalse( IP::isIPAddress( '.24.52.13' ), 'IPv4 starts with period' );
Index: trunk/phase3/includes/parser/Parser.php
@@ -1700,7 +1700,7 @@
17011701
17021702 $holders = new LinkHolderArray( $this );
17031703
1704 - # split the entire text string on occurences of [[
 1704+ # split the entire text string on occurrences of [[
17051705 $a = StringUtils::explode( '[[', ' ' . $s );
17061706 # get the first element (all text up to first [[), and remove the space we added
17071707 $s = $a->current();
@@ -2384,7 +2384,7 @@
23852385 }
23862386
23872387 /**
2388 - * Split up a string on ':', ignoring any occurences inside tags
 2388+ * Split up a string on ':', ignoring any occurrences inside tags
23892389 * to prevent illegal overlapping.
23902390 *
23912391 * @param $str String the string to split
Index: trunk/phase3/resources/jquery/jquery.highlightText.js
@@ -23,7 +23,7 @@
2424 // TODO - need to be smarter about the character matching here.
2525 // non latin characters can make regex think a new word has begun: do not use \b
2626 // http://stackoverflow.com/questions/3787072/regex-wordwrap-with-utf8-characters-in-js
27 - // look for an occurence of our pattern and store the starting position
 27+ // look for an occurrence of our pattern and store the starting position
2828 var match = node.data.match( new RegExp( "(^|\\s)" + $.escapeRE( pat ), "i" ) );
2929 if ( match ) {
3030 var pos = match.index + match[1].length; // include length of any matched spaces

Status & tagging log