Merge pull request #17678 from overleaf/em-diff-as-share-js-ops

Make diffAsShareJsOps() synchronous

GitOrigin-RevId: 5a3f96cc2f4b81e27a4ee971667f52c48c07e938
This commit is contained in:
Eric Mc Sween
2024-04-03 08:04:09 +00:00
committed by Copybot
parent bdab0d4c91
commit 3217870c04
4 changed files with 100 additions and 147 deletions
@@ -9,7 +9,7 @@ module.exports = {
REMOVED: -1,
UNCHANGED: 0,
diffAsShareJsOp(before, after, callback) {
diffAsShareJsOp(before, after) {
const diffs = dmp.diff_main(before.join('\n'), after.join('\n'))
dmp.diff_cleanupSemantic(diffs)
@@ -35,6 +35,6 @@ module.exports = {
throw new Error('Unknown type')
}
}
callback(null, ops)
return ops
},
}