diff --git a/www/common/json-ot.js b/www/common/json-ot.js index 41a628dc4..98e1af4ec 100644 --- a/www/common/json-ot.js +++ b/www/common/json-ot.js @@ -6,6 +6,11 @@ define([ var validate = JsonOT.validate = function (text, toTransform, transformBy) { try { + // text = O (mutual common ancestor) + // toTransform = A (the first incoming operation) + // transformBy = B (the second incoming operation) + // threeway merge (0, A, B) + var resultOp = ChainPad.Operation.transform0(text, toTransform, transformBy); var text2 = ChainPad.Operation.apply(transformBy, text); var text3 = ChainPad.Operation.apply(resultOp, text2);