Dividing the ordinary range of intersection of several nodes into several ranges

How to split a range into multiple rangy ranges that intersect across multiple nodes?

eg. I have a range indicated by { and } (tokens are not actually in the content):

 <p> I {like eggs. </p> <p> Yes I} do! </p> 

And I want to split one range into 2, each in its own node, for example:

 <p> I {like eggs. }</p> <p>{ Yes I} do! </p> 
+4
source share

Source: https://habr.com/ru/post/1447386/


All Articles