Shai Gerbi
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
4 deletions
-
README.md
|
|
|
@ -184,13 +184,13 @@ const md = markdownit({ |
|
|
|
highlight: function (str, lang) { |
|
|
|
if (lang && hljs.getLanguage(lang)) { |
|
|
|
try { |
|
|
|
return '<pre><code class="hljs">' + |
|
|
|
hljs.highlight(str, { language: lang, ignoreIllegals: true }).value + |
|
|
|
'</code></pre>'; |
|
|
|
return `<pre><code class="hljs"> |
|
|
|
${hljs.highlight(str, { language: lang, ignoreIllegals: true }).value} |
|
|
|
</code></pre>` |
|
|
|
} catch (__) {} |
|
|
|
} |
|
|
|
|
|
|
|
return '<pre><code class="hljs">' + md.utils.escapeHtml(str) + '</code></pre>'; |
|
|
|
return `<pre><code class="hljs">${md.utils.escapeHtml(str)}</code></pre>` |
|
|
|
} |
|
|
|
}); |
|
|
|
``` |
|
|
|
|