(code, lang)
| 1 | const memoize = require('lodash.memoize'); |
| 2 | |
| 3 | function highlightCode(code, lang) { |
| 4 | if (window.Prism) { |
| 5 | return window.Prism.highlight(code, window.Prism.languages[lang]) |
| 6 | } else { |
| 7 | return code; |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | function getHighlightedCodeLines(code, lang) { |
| 12 | return highlightCode(code, lang).split('\n'); |
no outgoing calls
no test coverage detected