Skip to content

Commit

Permalink
(chore) Fix README to use a valid language in the example
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Mar 23, 2020
1 parent 33a6718 commit 166aa0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ Or for a smaller footprint... load just the languages you need.
```js
const hljs = require("highlight.js/lib/core"); // require only the core library
// separately require languages
hljs.registerLanguage('html', require('highlight.js/lib/languages/html'));
hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml'));

const highlightedCode = hljs.highlight('html', '<span>Hello World!</span>').value
const highlightedCode = hljs.highlight('xml', '<span>Hello World!</span>').value
```


Expand Down

0 comments on commit 166aa0a

Please sign in to comment.