MCPcopy Index your code
hub / github.com/TruthHun/BookStack / interpretTokenStyle

Function interpretTokenStyle

static/mergely/lib/codemirror.js:6903–6908  ·  view source on GitHub ↗
(style, options)

Source from the content-addressed store, hash-verified

6901 // and also looks for line-wide styles.
6902 var styleToClassCache = {}, styleToClassCacheWithMode = {};
6903 function interpretTokenStyle(style, options) {
6904 if (!style || /^\s*$/.test(style)) return null;
6905 var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
6906 return cache[style] ||
6907 (cache[style] = style.replace(/\S+/g, "cm-$&"));
6908 }
6909
6910 // Render the DOM representation of the text of a line. Also builds
6911 // up a 'line map', which points at the DOM nodes that represent

Callers 1

insertLineContentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected