Skip to content

Commit

Permalink
Updated index.html to fix broken instructions (#1462)
Browse files Browse the repository at this point in the history
* 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: #972

* Updated index.html to fix nodejs instructions

Fixed the require so that nodejs does not give an error when requiring the loadLanguages function.
  • Loading branch information
Shivang44 authored and Golmote committed Jul 6, 2018
1 parent e00b408 commit 7418dfd
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/');
loadLanguages(['haml']);

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

0 comments on commit 7418dfd

Please sign in to comment.