|
|
@ -18,10 +18,16 @@ __v4.+ changed internals! Plugins need update. See [migration details](https://g |
|
|
|
|
|
|
|
__Table of content__ |
|
|
|
|
|
|
|
- [markdown-it](#markdown-it) |
|
|
|
- [Install](#install) |
|
|
|
- [Usage examples](#usage-examples) |
|
|
|
- [Simple](#simple) |
|
|
|
- [Init with presets and options](#init-with-presets-and-options) |
|
|
|
- [Plugins load](#plugins-load) |
|
|
|
- [Syntax highlighting](#syntax-highlighting) |
|
|
|
- [API](#api) |
|
|
|
- [Syntax extensions](#syntax-extensions) |
|
|
|
- [Manage rules](#manage-rules) |
|
|
|
- [Benchmark](#benchmark) |
|
|
|
- [Authors](#authors) |
|
|
|
- [References / Thanks](#references--thanks) |
|
|
@ -142,7 +148,7 @@ var md = require('markdown-it')({ |
|
|
|
highlight: function (str, lang) { |
|
|
|
if (lang && hljs.getLanguage(lang)) { |
|
|
|
try { |
|
|
|
return hljs.highlight(lang, str).value; |
|
|
|
return hljs.highlight(str, { language: lang }).value; |
|
|
|
} catch (__) {} |
|
|
|
} |
|
|
|
|
|
|
|