diff --git a/README.md b/README.md index 111ee9181a..6f47fcd925 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ onmessage = (event) => { You can use highlight.js with node to highlight content before sending it to the browser. Make sure to use the `.value` property to get the formatted html. -For more info about the returned object refer to the api docs https://highlightjs.readthedocs.io/en/latest/api.html +For more info about the returned object refer to the [api docs](https://highlightjs.readthedocs.io/en/latest/api.html). ```js @@ -181,7 +181,7 @@ const highlightedCode = hljs.highlightAuto('Hello World!').value Or for a smaller footprint... load just the languages you need. ```js -const hljs = require("highlight.js/lib/core"); // require only the core library +const hljs = require('highlight.js/lib/core'); // require only the core library // separately require languages hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml')); @@ -243,31 +243,32 @@ A prebuilt version of highlight.js bundled with many common languages is hosted **cdnjs** ([link](https://cdnjs.com/libraries/highlight.js)) ```html - - + + - + ``` **jsdelivr** ([link](https://www.jsdelivr.com/package/gh/highlightjs/cdn-release)) ```html - - + + + + ``` **unpkg** ([link](https://unpkg.com/browse/@highlightjs/cdn-assets/)) ```html - - + + + + ``` **Note:** *The CDN-hosted `highlight.min.js` package doesn't bundle every language.* It would be -very large. You can find our list "common" languages that we bundle by default on our [download page][5]. +very large. You can find our list of "common" languages that we bundle by default on our [download page][5]. ### Self Hosting