Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Added small improvements to model/writer.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
ma2ciek committed Jan 26, 2018
1 parent 92fda51 commit 4e80fa9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/model/writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,8 @@ export default class Writer {

/**
* @private
* @param {String} key
* @param {*} value
* @param {String} key Key of the attribute to remove.
* @param {*} value Attribute value.
*/
_setSelectionAttribute( key, value ) {
const selection = this.model.document.selection;
Expand All @@ -891,7 +891,7 @@ export default class Writer {
/**
* Removes an attribute with given key from the selection.
*
* @param {String|Iterable.<String>} keyOrIterableOfKeys Key of the attribute to remove.
* @param {String|Iterable.<String>} keyOrIterableOfKeys Key of the attribute to remove or an iterable of attribute keys to remove.
*/
removeSelectionAttribute( keyOrIterableOfKeys ) {
this._assertWriterUsedCorrectly();
Expand Down
2 changes: 1 addition & 1 deletion src/view/writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ export function wrap( range, attribute, viewSelection = null ) {

// If wrapping position is equal to view selection, move view selection inside wrapping attribute element.
if ( viewSelection && viewSelection.isCollapsed && viewSelection.getFirstPosition().isEqual( range.start ) ) {
viewSelection.setTo( new Range( position ) );
viewSelection.setTo( position );
}

return new Range( position );
Expand Down

0 comments on commit 4e80fa9

Please sign in to comment.