Skip to content

Commit

Permalink
Updated index.html to fix broken instructions
Browse files Browse the repository at this point in the history
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: PrismJS#972
  • Loading branch information
Shivang44 authored Jul 6, 2018
1 parent e00b408 commit dcc4a36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ <h2>Usage with Node</h2>
<p>Example:</p>

<pre><code class="language-js">var Prism = require('prismjs');
var loadLanguages = require('prismjs/components');
var loadLanguages = require('prismjs/components/index.js');
loadLanguages(['haml']);

// The code snippet you want to highlight, as a string
Expand Down

0 comments on commit dcc4a36

Please sign in to comment.