Commit 7418dfddbc937fa107e39751b2f9910a197df63b

Shivang Saxena 2018-07-06T16:48:04

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/index.html b/index.html
index 532e2df..2d6b430 100644
--- a/index.html
+++ b/index.html
@@ -188,7 +188,7 @@ var html = Prism.highlight(code, Prism.languages.javascript, 'javascript');</cod
 	<p>Example:</p>
 
 	<pre><code class="language-js">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