jenkins-bot has submitted this change and it was merged.
Change subject: Fix lots of spelling mistakes and typos
......................................................................
Fix lots of spelling mistakes and typos
Change-Id: I64985db430ee38e21e5948b16811c736b2ae846d
---
M src/unicodejs.graphemebreak.js
M src/unicodejs.js
M src/unicodejs.textstring.js
M src/unicodejs.wordbreak.js
4 files changed, 20 insertions(+), 20 deletions(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/unicodejs.graphemebreak.js b/src/unicodejs.graphemebreak.js
index 26c8c61..1078c51 100644
--- a/src/unicodejs.graphemebreak.js
+++ b/src/unicodejs.graphemebreak.js
@@ -90,7 +90,7 @@
* Split a string into grapheme clusters.
*
* @param {string} text Text to split
- * @returns {string[]} Array of clusters
+ * @return {string[]} Array of clusters
*/
graphemebreak.splitClusters = function ( text ) {
var i, parts, length, clusters = [];
diff --git a/src/unicodejs.js b/src/unicodejs.js
index d8a3e08..736a0a7 100644
--- a/src/unicodejs.js
+++ b/src/unicodejs.js
@@ -21,7 +21,7 @@
* You probably want to call unicodeJS.graphemebreak.splitClusters
instead.
*
* @param {string} text Text to split
- * @returns {string[]} Array of characters
+ * @return {string[]} Array of characters
*/
unicodeJS.splitCharacters = function ( text ) {
return text.split( /(?![\uDC00-\uDFFF])/g );
@@ -33,7 +33,7 @@
*
* @private
* @param {number} codeUnit integer between 0x0000 and 0xFFFF
- * @returns {string} String literal ('\u' followed by 4 hex digits)
+ * @return {string} String literal ('\u' followed by 4 hex digits)
*/
function uEsc( codeUnit ) {
return '\\u' + ( codeUnit + 0x10000 ).toString( 16 ).substr( -4
);
@@ -45,8 +45,8 @@
* @private
* @param {number} min the minimum code unit in the range.
* @param {number} max the maximum code unit in the range.
- * @param {boolean} bracket If true, then wrap range in [ ... ]
- * @returns {string} Regexp string which matches the range
+ * @param {boolean} [bracket] If true, then wrap range in [ ... ]
+ * @return {string} Regexp string which matches the range
*/
function codeUnitRange( min, max, bracket ) {
var value;
@@ -81,7 +81,7 @@
* @private
* @param {number} ch1 The min character of the range; must be over
0xFFFF
* @param {number} ch2 The max character of the range; must be at least
ch1
- * @returns {Object} A list of boxes {hi: [x, y], lo: [z, w]}
+ * @return {Object} A list of boxes {hi: [x, y], lo: [z, w]}
*/
function getCodeUnitBoxes( ch1, ch2 ) {
var loMin, loMax, hi1, hi2, lo1, lo2, boxes, hiMinAbove,
hiMaxBelow;
@@ -133,10 +133,11 @@
* only match ill-formed strings).
*
* @param {Array} ranges Array of ranges, each of which is a character
or an interval
- * @returns {string} Regexp string for the disjunction of the ranges.
+ * @return {string} Regexp string for the disjunction of the ranges.
*/
unicodeJS.charRangeArrayRegexp = function ( ranges ) {
- var i, j, min, max, hi, lo, range, box, boxes,
+ var i, j, min, max, hi, lo, range, box,
+ boxes = [],
characterClass = [], // list of (\uXXXX code unit or
interval), for BMP
disjunction = []; // list of regex strings, to be
joined with '|'
@@ -182,7 +183,6 @@
if ( max <= 0xFFFF ) {
// interval is entirely BMP
characterClass.push( codeUnitRange( min, max )
);
- boxes = [];
} else if ( min <= 0xFFFF && max > 0xFFFF ) {
// interval is BMP and non-BMP
characterClass.push( codeUnitRange( min, 0xFFFF
) );
diff --git a/src/unicodejs.textstring.js b/src/unicodejs.textstring.js
index 9ee4218..f89ea0e 100644
--- a/src/unicodejs.textstring.js
+++ b/src/unicodejs.textstring.js
@@ -26,7 +26,7 @@
*
* @method
* @param {number} position Position to read from
- * @returns {string|null} Grapheme cluster, or null if out of bounds
+ * @return {string|null} Grapheme cluster, or null if out of bounds
*/
unicodeJS.TextString.prototype.read = function ( position ) {
var clusterAt = this.clusters[position];
@@ -37,7 +37,7 @@
* Return number of grapheme clusters in the text string
*
* @method
- * @returns {number} Number of grapheme clusters
+ * @return {number} Number of grapheme clusters
*/
unicodeJS.TextString.prototype.getLength = function () {
return this.clusters.length;
@@ -48,7 +48,7 @@
*
* @param {number} start Start offset
* @param {number} end End offset
- * @returns {unicodeJS.TextString} New TextString object containing substring
+ * @return {unicodeJS.TextString} New TextString object containing substring
*/
unicodeJS.TextString.prototype.substring = function ( start, end ) {
var textString = new unicodeJS.TextString( '' );
@@ -59,7 +59,7 @@
/**
* Get as a plain string
*
- * @returns {string} Plain javascript string
+ * @return {string} Plain javascript string
*/
unicodeJS.TextString.prototype.getString = function () {
return this.clusters.join( '' );
diff --git a/src/unicodejs.wordbreak.js b/src/unicodejs.wordbreak.js
index 26dc1c6..62937d9 100644
--- a/src/unicodejs.wordbreak.js
+++ b/src/unicodejs.wordbreak.js
@@ -34,13 +34,13 @@
* We are making a working assumption that we can implement the Unicode
* word boundary specification by taking the property value of the
*first*
* character of the cluster. In particular, this implements WB4 for us,
because
- * non-initial Extend or Format characters disapper.
+ * non-initial Extend or Format characters disappear.
*
* See http://www.unicode.org/reports/tr29/#Word_Boundaries
*
* @private
* @param {string} cluster The grapheme cluster
- * @returns {string} The unicode wordbreak property value
+ * @return {string} The unicode wordbreak property value
*/
function getProperty( cluster ) {
var character, property;
@@ -64,7 +64,7 @@
* @param {unicodeJS.TextString} string TextString
* @param {number} pos Character position
* @param {boolean} [onlyAlphaNumeric=false] When set, ignores a break
if the previous character is not alphaNumeric
- * @returns {number} Returns the next offset which is a word break
+ * @return {number} Returns the next offset which is a word break
*/
wordbreak.nextBreakOffset = function ( string, pos, onlyAlphaNumeric ) {
return wordbreak.moveBreakOffset( 1, string, pos,
onlyAlphaNumeric );
@@ -75,7 +75,7 @@
* @param {unicodeJS.TextString} string TextString
* @param {number} pos Character position
* @param {boolean} [onlyAlphaNumeric=false] When set, ignores a break
if the previous character is not alphaNumeric
- * @returns {number} Returns the previous offset which is a word break
+ * @return {number} Returns the previous offset which is a word break
*/
wordbreak.prevBreakOffset = function ( string, pos, onlyAlphaNumeric ) {
return wordbreak.moveBreakOffset( -1, string, pos,
onlyAlphaNumeric );
@@ -87,7 +87,7 @@
* @param {unicodeJS.TextString} string TextString
* @param {number} pos Character position
* @param {boolean} [onlyAlphaNumeric=false] When set, ignores a break
if the previous character is not alphaNumeric
- * @returns {number} Returns the previous offset which is word break
+ * @return {number} Returns the previous offset which is word break
*/
wordbreak.moveBreakOffset = function ( direction, string, pos,
onlyAlphaNumeric ) {
var lastProperty, i = pos,
@@ -116,10 +116,10 @@
};
/**
- * Evaluates if the sepcified position within some text is a word
boundary.
+ * Evaluates if the specified position within some text is a word
boundary.
* @param {unicodeJS.TextString} string Text string
* @param {number} pos Character position
- * @returns {boolean} Is the position a word boundary
+ * @return {boolean} Is the position a word boundary
*/
wordbreak.isBreak = function ( string, pos ) {
// Break at the start and end of text.
--
To view, visit https://gerrit.wikimedia.org/r/174942
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I64985db430ee38e21e5948b16811c736b2ae846d
Gerrit-PatchSet: 1
Gerrit-Project: unicodejs
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits