Merge pull request #18659 from overleaf/em-crop-comments-tracked-deletes

Crop comments when processing tracked deletes

GitOrigin-RevId: 662c9ed86a8ed4959d1671ce466548487f334f45
This commit is contained in:
Eric Mc Sween
2024-06-04 07:36:44 -04:00
committed by Copybot
parent 4101f4efeb
commit 55c342134c
5 changed files with 214 additions and 7 deletions

View File

@@ -23,6 +23,12 @@ class AddCommentOperation extends EditOperation {
constructor(commentId, ranges, resolved = false) {
super()
for (const range of ranges) {
if (range.isEmpty()) {
throw new Error("AddCommentOperation can't be built with empty ranges")
}
}
/** @readonly */
this.commentId = commentId