(style, options)
| 49 | // and also looks for line-wide styles. |
| 50 | let styleToClassCache = {}, styleToClassCacheWithMode = {} |
| 51 | function interpretTokenStyle(style, options) { |
| 52 | if (!style || /^\s*$/.test(style)) return null |
| 53 | let cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache |
| 54 | return cache[style] || |
| 55 | (cache[style] = style.replace(/\S+/g, "cm-$&")) |
| 56 | } |
| 57 | |
| 58 | // Render the DOM representation of the text of a line. Also builds |
| 59 | // up a 'line map', which points at the DOM nodes that represent |
no test coverage detected