MCPcopy
hub / github.com/witheve/Eve / interpretTokenStyle

Function interpretTokenStyle

src/codemirror.js:6928–6933  ·  view source on GitHub ↗
(style, options)

Source from the content-addressed store, hash-verified

6926 // and also looks for line-wide styles.
6927 var styleToClassCache = {}, styleToClassCacheWithMode = {};
6928 function interpretTokenStyle(style, options) {
6929 if (!style || /^\s*$/.test(style)) return null;
6930 var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
6931 return cache[style] ||
6932 (cache[style] = style.replace(/\S+/g, "cm-$&"));
6933 }
6934
6935 // Render the DOM representation of the text of a line. Also builds
6936 // up a 'line map', which points at the DOM nodes that represent

Callers 1

insertLineContentFunction · 0.85

Calls 1

testMethod · 0.45

Tested by

no test coverage detected