MCPcopy Create free account
hub / github.com/TruthHun/BookStack / getObj

Function getObj

static/editor.md/lib/codemirror/lib/codemirror.js:6567–6572  ·  view source on GitHub ↗
(copy)

Source from the content-addressed store, hash-verified

6565 // Utility for getTokenAt and getLineTokens
6566 function takeToken(cm, pos, precise, asArray) {
6567 function getObj(copy) {
6568 return {start: stream.start, end: stream.pos,
6569 string: stream.current(),
6570 type: style || null,
6571 state: copy ? copyState(doc.mode, state) : state};
6572 }
6573
6574 var doc = cm.doc, mode = doc.mode, style;
6575 pos = clipPos(doc, pos);

Callers 1

takeTokenFunction · 0.70

Calls 1

copyStateFunction · 0.85

Tested by

no test coverage detected