mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Don't complain about comment markers when checking
This commit is contained in:
parent
8c65cb5835
commit
a907ec04fc
1 changed files with 14 additions and 2 deletions
|
@ -90,16 +90,28 @@ define [
|
|||
for marker_id, marker of session.getMarkers()
|
||||
markers[marker_id] = marker
|
||||
|
||||
expected_markers = []
|
||||
for change in @changesTracker.changes
|
||||
op = change.op
|
||||
marker_id = @changeIdToMarkerIdMap[change.id]
|
||||
|
||||
start = @_shareJsOffsetToAcePosition(op.p)
|
||||
if op.i?
|
||||
end = @_shareJsOffsetToAcePosition(op.p + op.i.length)
|
||||
else if op.d?
|
||||
end = start
|
||||
|
||||
expected_markers.push {
|
||||
marker_id, start, end
|
||||
}
|
||||
|
||||
for comment in @changesTracker.comments
|
||||
marker_id = @changeIdToMarkerIdMap[comment.id]
|
||||
start = @_shareJsOffsetToAcePosition(comment.offset)
|
||||
end = @_shareJsOffsetToAcePosition(comment.offset + comment.length)
|
||||
expected_markers.push {
|
||||
marker_id, start, end
|
||||
}
|
||||
|
||||
for {marker_id, start, end} in expected_markers
|
||||
marker = markers[marker_id]
|
||||
delete markers[marker_id]
|
||||
if marker.range.start.row != start.row or
|
||||
|
|
Loading…
Reference in a new issue