From 7418dfddbc937fa107e39751b2f9910a197df63b Mon Sep 17 00:00:00 2001 From: Shivang Saxena Date: Fri, 6 Jul 2018 16:48:04 -0400 Subject: [PATCH] Updated index.html to fix broken instructions (#1462) * Updated index.html to fix broken instructions Requiring components without the "index.js" part and calling "loadLanguages" results in a function not found error for me. Adding index.js, as commented by @golmote, fixes that error. Ref: https://github.com/PrismJS/prism/issues/972 * Updated index.html to fix nodejs instructions Fixed the require so that nodejs does not give an error when requiring the loadLanguages function. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 532e2dfb43..2d6b430582 100644 --- a/index.html +++ b/index.html @@ -188,7 +188,7 @@

Usage with Node

Example:

var Prism = require('prismjs');
-var loadLanguages = require('prismjs/components');
+var loadLanguages = require('prismjs/components/');
 loadLanguages(['haml']);
 
 // The code snippet you want to highlight, as a string