@@ -301,8 +301,8 @@ onmessage = (event) => {
301301
302302## Node.js
303303
304- You can use highlight.js with node to highlight content before sending it to the browser.
305- Make sure to use the ` .value ` property to get the formatted html.
304+ You can use highlight.js with node to highlight content before sending it to the browser.
305+ Make sure to use the ` .value ` property to get the formatted html.
306306For more info about the returned object refer to the api docs https://highlightjs.readthedocs.io/en/latest/api.html
307307
308308
@@ -314,7 +314,7 @@ const highlightedCode = hljs.highlightAuto('<span>Hello World!</span>').value
314314
315315``` js
316316// require the highlight.js library without languages
317- const hljs = require (" highlight.js/lib/highlight .js" );
317+ const hljs = require (" highlight.js/lib/core .js" );
318318// separately require languages
319319hljs .registerLanguage (' html' , require (' highlight.js/lib/languages/html' ));
320320hljs .registerLanguage (' sql' , require (' highlight.js/lib/languages/sql' ));
@@ -371,15 +371,15 @@ import hljs from 'highlight.js';
371371The default import imports all languages! Therefore it is likely to be more efficient to import only the library and the languages you need:
372372
373373``` js
374- import hljs from ' highlight.js/lib/highlight ' ;
374+ import hljs from ' highlight.js/lib/core ' ;
375375import javascript from ' highlight.js/lib/languages/javascript' ;
376376hljs .registerLanguage (' javascript' , javascript);
377377```
378378
379379To set the syntax highlighting style, if your build tool processes CSS from your JavaScript entry point, you can import the stylesheet directly into your CommonJS-module:
380380
381381``` js
382- import hljs from ' highlight.js/lib/highlight ' ;
382+ import hljs from ' highlight.js/lib/core ' ;
383383import ' highlight.js/styles/github.css' ;
384384```
385385
0 commit comments