Skip to content

Commit

Permalink
Removed JS code block language extraction in favor of a rust implemen…
Browse files Browse the repository at this point in the history
…tation `rust-clippy#7352`
  • Loading branch information
xFrednet committed Jun 26, 2021
1 parent 1feb0d7 commit e5f8927
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions util/gh-pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,12 @@ <h2 class="panel-title">
linkify: true,
typographer: true,
highlight: function (str, lang) {
if (lang) {
// This removes additional markdown information like `,ignore`.
let onlyLang = lang.split(",")[0];
if (hljs.getLanguage(onlyLang)) {
try {
return '<pre class="hljs"><code>' +
hljs.highlight(onlyLang, str, true).value +
'</code></pre>';
} catch (__) {}
}
if (lang && hljs.getLanguage(docs)) {
try {
return '<pre class="hljs"><code>' +
hljs.highlight(docs, str, true).value +
'</code></pre>';
} catch (__) {}
}

return '<pre class="hljs"><code>' + md.utils.escapeHtml(str) + '</code></pre>';
Expand Down

0 comments on commit e5f8927

Please sign in to comment.