MCPcopy
hub / github.com/DHTMLX/gantt / copyState

Function copyState

samples/common/codehighlight/codemirror.js:776–786  ·  view source on GitHub ↗
(mode, state)

Source from the content-addressed store, hash-verified

774 }
775
776 function copyState(mode, state) {
777 if (state === true) { return state }
778 if (mode.copyState) { return mode.copyState(state) }
779 var nstate = {};
780 for (var n in state) {
781 var val = state[n];
782 if (val instanceof Array) { val = val.concat([]); }
783 nstate[n] = val;
784 }
785 return nstate
786 }
787
788 // Given a mode and a state (for that mode), find the inner mode and
789 // state at the position that the state refers to.

Callers 4

codemirror.jsFile · 0.85
getLineStylesFunction · 0.85
takeTokenFunction · 0.85
highlightWorkerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected