* @param {string} value * Value to highlight. * @param {string} scope * Scope to highlight with.
(value, scope)
| 58 | * Scope to highlight with. |
| 59 | */ |
| 60 | function generate(value, scope) { |
| 61 | const className = scope.replace(/^source\./, '').replace(/\./g, '-') |
| 62 | return `<div class="highlight highlight-${className}"><pre>${toHtml( |
| 63 | highlighter.highlight(value, scope) |
| 64 | )} |
| 65 | </pre></div>` |
| 66 | } |