blob: 535e857d7a94b56a024a7516493b3fa9f34d16cf (
plain)
1
2
3
4
5
6
7
8
9
10
|
import { highlight } from './highlight_utils';
/**
* A webworker for highlighting large amounts of content with Highlight.js
*/
// eslint-disable-next-line no-restricted-globals
self.addEventListener('message', ({ data: { fileType, content, language } }) => {
// eslint-disable-next-line no-restricted-globals
self.postMessage(highlight(fileType, content, language));
});
|