MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / interpretTokenStyle

Function interpretTokenStyle

static/libs/codemirror.js:1795–1800  ·  view source on GitHub ↗
(style, options)

Source from the content-addressed store, hash-verified

1793var styleToClassCache = {};
1794var styleToClassCacheWithMode = {};
1795function interpretTokenStyle(style, options) {
1796 if (!style || /^\s*$/.test(style)) { return null }
1797 var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
1798 return cache[style] ||
1799 (cache[style] = style.replace(/\S+/g, "cm-$&"))
1800}
1801
1802// Render the DOM representation of the text of a line. Also builds
1803// 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