File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff 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>' ;
You can’t perform that action at this time.
0 commit comments