From 42dee599718a8a816c00da495ee266cdc8b8a896 Mon Sep 17 00:00:00 2001 From: Frank Epperlein Date: Tue, 20 Jul 2021 10:01:37 +0200 Subject: [PATCH] export insertFolds funtion for use in manual mode Required for nlundquist/prism-js-fold#1 --- prism-js-fold.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 + } +}