mirror of https://github.com/xwiki-labs/cryptpad
comments describing the role of each argument
This commit is contained in:
parent
df78d284c4
commit
c50690349b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue