diff --git a/prism-js-fold.js b/prism-js-fold.js index 1ad100d..99623ec 100644 --- a/prism-js-fold.js +++ b/prism-js-fold.js @@ -95,4 +95,10 @@ if (Prism) { Prism.hooks.add('before-all-elements-highlight', ({ elements }) => elements.forEach(insertFolds)) } else { console.warn('prism-js-fold: Prism was not loaded so we could not add the Prism hook needed for code folding insertion.') -} \ No newline at end of file +} + +if (typeof module !== 'undefined' && module.exports) { + module.exports = { + insertFolds: insertFolds + } +}