diff --git a/README.md b/README.md index 4cbcbb14..da0de403 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ var hljs = require('highlight.js') // https://highlightjs.org/ // Actual default values var md = new Remarkable({ + langPrefix: 'hljs language-', highlight: function (str, lang) { if (lang && hljs.getLanguage(lang)) { try { @@ -180,6 +181,7 @@ var md = new Remarkable({ }); ``` +The `langPrefix` option is required to pass the `hljs` class to the code block so that the full Highlight.js styles are applied correctly. Note that it will only work if [your fenced code block has params set, like a language param](https://github.com/jonschlinkert/remarkable/issues/224#issuecomment-339686207). ### Syntax extensions