MCPcopy
hub / github.com/marktext/marktext / replaceOperation

Method replaceOperation

packages/muya/src/state/index.ts:116–122  ·  view source on GitHub ↗
(path: Path, oldValue: Doc, newValue: Doc)

Source from the content-addressed store, hash-verified

114 }
115
116 replaceOperation(path: Path, oldValue: Doc, newValue: Doc) {
117 const operation = json1.replaceOp(path, oldValue, newValue)!;
118
119 this._operationCache.push(operation);
120
121 this._emitStateChange();
122 }
123
124 dispatch(op: JSONOp, source = 'user' /* user, api */) {
125 const prevDoc = this.getState();

Callers 1

checkedMethod · 0.80

Calls 2

_emitStateChangeMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected