MCPcopy Create free account
hub / github.com/sql-js/sql.js / interpretTokenStyle

Function interpretTokenStyle

GUI/codemirror/lib/codemirror.js:5697–5702  ·  view source on GitHub ↗
(style, options)

Source from the content-addressed store, hash-verified

5695 // and also looks for line-wide styles.
5696 var styleToClassCache = {}, styleToClassCacheWithMode = {};
5697 function interpretTokenStyle(style, options) {
5698 if (!style || /^\s*$/.test(style)) return null;
5699 var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
5700 return cache[style] ||
5701 (cache[style] = style.replace(/\S+/g, "cm-$&"));
5702 }
5703
5704 // Render the DOM representation of the text of a line. Also builds
5705 // up a 'line map', which points at the DOM nodes that represent

Callers 1

insertLineContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…