mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
Merge "Typo fixes throughout the codebase"
This commit is contained in:
commit
01407b1ec5
|
@ -119,7 +119,7 @@ ve.ce.BranchNode.prototype.updateDomWrapper = function( key ) {
|
|||
* Responds to splice events on a ve.dm.BranchNode.
|
||||
*
|
||||
* ve.ce.Node objects are generated from the inserted ve.dm.Node objects, producing a view that's a
|
||||
* mirror of it's model.
|
||||
* mirror of its model.
|
||||
*
|
||||
* @method
|
||||
* @param {Integer} index Index to remove and or insert nodes at
|
||||
|
|
|
@ -200,7 +200,7 @@ ve.ce.Node.prototype.attach = function( parent ) {
|
|||
};
|
||||
|
||||
/**
|
||||
* Detaches node from it's parent.
|
||||
* Detaches node from its parent.
|
||||
*
|
||||
* @method
|
||||
* @emits detach (parent)
|
||||
|
|
|
@ -43,7 +43,7 @@ ve.ce.getDomText = function( element ) {
|
|||
// Replace IE's carriage returns
|
||||
return element.innerText.replace( /\r\n/g, '' );
|
||||
} else {
|
||||
// Traverse it's children
|
||||
// Traverse its children
|
||||
for ( element = element.firstChild; element; element = element.nextSibling) {
|
||||
text += func( element );
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ ve.ce.getDomText = function( element ) {
|
|||
return element.nodeValue;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
};
|
||||
// Return the text, replacing spaces and non-breaking spaces with spaces?
|
||||
// TODO: Why are we replacing spaces (\u0020) with spaces (' ')
|
||||
return func( element ).replace( ve.ce.whitespacePattern, ' ' );
|
||||
|
@ -80,7 +80,7 @@ ve.ce.getDomHash = function( element ) {
|
|||
return '#';
|
||||
} else if ( nodeType === 1 || nodeType === 9 ) {
|
||||
hash += '<' + nodeName + '>';
|
||||
// Traverse it's children
|
||||
// Traverse its children
|
||||
for ( element = element.firstChild; element; element = element.nextSibling) {
|
||||
hash += ve.ce.getDomHash( element );
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ ve.dm.Converter.getDataContentFromText = function( text, annotations ) {
|
|||
// Make a shallow copy of the annotationMap object, otherwise adding an annotation to one
|
||||
// character automatically adds it to all of others as well, annotations should be treated
|
||||
// as immutable, so it's OK to share references, but annotation maps are not immutable, so
|
||||
// it's not safe to share references - each annotated character needs it's own map
|
||||
// its not safe to share references - each annotated character needs its own map
|
||||
characters[i] = [characters[i], ve.extendObject( {}, annotationMap )];
|
||||
}
|
||||
return characters;
|
||||
|
@ -57,8 +57,8 @@ ve.dm.Converter.getDataContentFromText = function( text, annotations ) {
|
|||
/**
|
||||
* Responds to register events from the node factory.
|
||||
*
|
||||
* If a node is special; such as document, alienInline, alienBlock and text; it's converters data
|
||||
* should be set to null, as to distinguish it from a new node type that someone has simply
|
||||
* If a node is special; such as document, alienInline, alienBlock and text; its {converters}
|
||||
* property should be set to null, as to distinguish it from a new node type that someone has simply
|
||||
* forgotten to implement converters for.
|
||||
*
|
||||
* @method
|
||||
|
|
|
@ -625,7 +625,7 @@ ve.dm.Document.prototype.getAnnotationsFromRange = function( range, all ) {
|
|||
if ( range.getLength() === 0 ) {
|
||||
return {};
|
||||
}
|
||||
// There's at least one character, get it's annotations
|
||||
// There's at least one character, get its annotations
|
||||
left = this.getAnnotationsFromOffset( range.start );
|
||||
// Shorcut for single character ranges
|
||||
if ( range.getLength() === 1 ) {
|
||||
|
|
|
@ -80,7 +80,7 @@ ve.dm.DocumentSynchronizer.synchronizers.attributeChange = function( action ) {
|
|||
*/
|
||||
ve.dm.DocumentSynchronizer.synchronizers.resize = function( action ) {
|
||||
action.node.adjustLength( action.adjustment );
|
||||
// no update needed, adjustLength causes an update event on it's own
|
||||
// no update needed, adjustLength causes an update event on its own
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* @class
|
||||
* @constructor
|
||||
* @param {Object[]} items List of items to append initially
|
||||
* @param {Function} callback Function to call if an item doesn't have it's own callback
|
||||
* @param {Function} callback Function to call if an item doesn't have its own callback
|
||||
* @param {jQuery} [$overlay=$( 'body' )] DOM selection to add nodes to
|
||||
*/
|
||||
ve.ui.Menu = function( items, callback, $overlay ) {
|
||||
|
|
|
@ -64,7 +64,7 @@ ve.proxy = $.proxy;
|
|||
ve.inArray = $.inArray;
|
||||
|
||||
/**
|
||||
* Generates a hash of an object based on it's name and data.
|
||||
* Generates a hash of an object based on its name and data.
|
||||
*
|
||||
* This is actually an alias for jQuery.json, which falls back to window.JSON if present.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue