We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd54995 commit 9f5c93cCopy full SHA for 9f5c93c
components/prism-core.js
@@ -426,3 +426,8 @@ return _self.Prism;
426
if (typeof module !== 'undefined' && module.exports) {
427
module.exports = Prism;
428
}
429
+
430
+// hack for components to work correctly in node.js
431
+if (typeof global !== 'undefined') {
432
+ global.Prism = Prism;
433
+}
plugins/file-highlight/prism-file-highlight.js
@@ -1,5 +1,5 @@
1
(function () {
2
- if (!self.Prism || !self.document || !document.querySelector) {
+ if (typeof self === 'undefined' || !self.Prism || !self.document || !document.querySelector) {
3
return;
4
5
0 commit comments