(style, options)
| 1793 | var styleToClassCache = {}; |
| 1794 | var styleToClassCacheWithMode = {}; |
| 1795 | function 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 |