Welcome to mirror list, hosted at ThFree Co, Russian Federation.

highlight.js « workers « source_viewer « components « vue_shared « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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));
});