How to use the hooks function from prismjs

Find comprehensive JavaScript prismjs.hooks code examples handpicked from public code repositorys.

12
13
14
15
16
17
18
19
20

function loader(input, options) {

    options = option.assignDefault(options);

    Prism.hooks.run('before-highlightall', {selector: SELECTOR});

    const $ = cheerio.load(input, options.cheerioOptions);
    const $elements = $(SELECTOR);
fork icon3
star icon4
watch icon2

+ 13 other calls in file