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

Commit

Permalink
Improved comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Aug 22, 2017
1 parent 7bf6fed commit 9f57e6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/deletecommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default class DeleteCommand extends Command {
*
* * the current limit element is empty,
* * the paragraph is allowed in the limit element,
* * other empty paragraph does not occur in the limit element.
* * the limit doesn't already have a paragraph inside.
*
* See https://github.com/ckeditor/ckeditor5-typing/issues/61.
*
Expand Down Expand Up @@ -153,7 +153,9 @@ export default class DeleteCommand extends Command {

const limitElementFirstChild = limitElement.getChild( 0 );

// Does nothing if limit element already contains an empty paragraph.
// Does nothing if the limit element already contains only a paragraph.
// We ignore the case when paragraph might have some inline elements (<p><inlineWidget>[]</inlineWidget></p>)
// because we don't support such cases yet and it's unclear whether inlineWidget shouldn't be a limit itself.
if ( limitElementFirstChild && limitElementFirstChild.name === 'paragraph' ) {
return false;
}
Expand Down

0 comments on commit 9f57e6f

Please sign in to comment.