Skip to content

Commit e5f8927

Browse files
committed
Removed JS code block language extraction in favor of a rust implementation rust-clippy#7352
1 parent 1feb0d7 commit e5f8927

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

util/gh-pages/index.html

+6-10
Original file line numberDiff line numberDiff line change
@@ -369,16 +369,12 @@ <h2 class="panel-title">
369369
linkify: true,
370370
typographer: true,
371371
highlight: function (str, lang) {
372-
if (lang) {
373-
// This removes additional markdown information like `,ignore`.
374-
let onlyLang = lang.split(",")[0];
375-
if (hljs.getLanguage(onlyLang)) {
376-
try {
377-
return '<pre class="hljs"><code>' +
378-
hljs.highlight(onlyLang, str, true).value +
379-
'</code></pre>';
380-
} catch (__) {}
381-
}
372+
if (lang && hljs.getLanguage(docs)) {
373+
try {
374+
return '<pre class="hljs"><code>' +
375+
hljs.highlight(docs, str, true).value +
376+
'</code></pre>';
377+
} catch (__) {}
382378
}
383379

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

0 commit comments

Comments
 (0)