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

Commit

Permalink
Docs: Reworded an inline comment to make it more clear.
Browse files Browse the repository at this point in the history
  • Loading branch information
scofalik committed Mar 26, 2019
1 parent 6a2578e commit d56a692
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/conversion/upcastdispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,15 @@ export default class UpcastDispatcher {
// Split element to allowed parent.
const splitResult = this.conversionApi.writer.split( modelCursor, allowedParent );

// Using the range returned by `model.Writer#split`, pair original elements with their split parts.
// The range returned from the writer spans "between" the split or precisely saying, from the end of the split element
// to the beginning of the other part of the split element:
// Using the range returned by `model.Writer#split`, we will pair original elements with their split parts.
//
// The range returned from the writer spans "over the split" or, precisely saying, from the end of the original (split) element
// to the beginning of the other (new) part of that element:
//
// <limit><a><b><c>X[]Y</c></b><a></limit> ->
// <limit><a><b><c>X[</c></b></a><a><b><c>]Y</c></b></a>
//
// After the split no meaningful content can be between the positions in `splitRange` - they have to be touching.
// After the split there cannot be any full node between the positions in `splitRange`. The positions are touching.
// Also, because of how splitting works, it is easy to notice, that "closing tags" are in the reverse order than "opening tags".
// Also, since we split all those elements, each of them has to have the other part.
//
Expand Down

0 comments on commit d56a692

Please sign in to comment.