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

index.js « plugins « 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: c9f7e5508bed1d797171ee289c7796095995d126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { HLJS_ON_AFTER_HIGHLIGHT } from '../constants';
import wrapComments from './wrap_comments';

/**
 * Registers our plugins for Highlight.js
 *
 * Plugin API: https://github.com/highlightjs/highlight.js/blob/main/docs/plugin-api.rst
 *
 * @param {Object} hljs - the Highlight.js instance.
 */
export const registerPlugins = (hljs) => {
  hljs.addPlugin({ [HLJS_ON_AFTER_HIGHLIGHT]: wrapComments });
};