MCPcopy Create free account
hub / github.com/TruthHun/BookStack / interpretTokenStyle

Function interpretTokenStyle

static/editor.md/lib/codemirror/lib/codemirror.js:6696–6701  ·  view source on GitHub ↗
(style, options)

Source from the content-addressed store, hash-verified

6694 // and also looks for line-wide styles.
6695 var styleToClassCache = {}, styleToClassCacheWithMode = {};
6696 function interpretTokenStyle(style, options) {
6697 if (!style || /^\s*$/.test(style)) return null;
6698 var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
6699 return cache[style] ||
6700 (cache[style] = style.replace(/\S+/g, "cm-$&"));
6701 }
6702
6703 // Render the DOM representation of the text of a line. Also builds
6704 // 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