| 6901 | // and also looks for line-wide styles. |
| 6902 | var styleToClassCache = {}, styleToClassCacheWithMode = {}; |
| 6903 | function interpretTokenStyle(style, options) { |
| 6904 | if (!style || /^\s*$/.test(style)) return null; |
| 6905 | var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache; |
| 6906 | return cache[style] || |
| 6907 | (cache[style] = style.replace(/\S+/g, "cm-$&")); |
| 6908 | } |
| 6909 | |
| 6910 | // Render the DOM representation of the text of a line. Also builds |
| 6911 | // up a 'line map', which points at the DOM nodes that represent |