MCPcopy Index your code
hub / github.com/DHTMLX/gantt / interpretTokenStyle

Function interpretTokenStyle

samples/common/codehighlight/codemirror.js:1714–1719  ·  view source on GitHub ↗
(style, options)

Source from the content-addressed store, hash-verified

1712 // and also looks for line-wide styles.
1713 var styleToClassCache = {}, styleToClassCacheWithMode = {};
1714 function interpretTokenStyle(style, options) {
1715 if (!style || /^\s*$/.test(style)) { return null }
1716 var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
1717 return cache[style] ||
1718 (cache[style] = style.replace(/\S+/g, "cm-$&"))
1719 }
1720
1721 // Render the DOM representation of the text of a line. Also builds
1722 // 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