File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ const markdownOptions = {
5959 // highlight.js expects "typescript" written out, while Github supports "ts".
6060 const lang = language . toLowerCase ( ) === 'ts' ? 'typescript' : language ;
6161
62- return hljs . highlight ( lang , code ) . value ;
62+ return hljs . highlight ( code , { language : lang } ) . value ;
6363 }
6464
6565 return code ;
Original file line number Diff line number Diff line change @@ -8,8 +8,9 @@ const highlightJs = require('highlight.js');
88 */
99export function highlightCodeBlock ( code : string , language : string ) {
1010 if ( language ) {
11- return highlightJs . highlight (
12- language . toLowerCase ( ) === 'ts' ? 'typescript' : language , code ) . value ;
11+ return highlightJs . highlight ( code , {
12+ language : language . toLowerCase ( ) === 'ts' ? 'typescript' : language
13+ } ) . value ;
1314 }
1415
1516 return code ;
You can’t perform that action at this time.
0 commit comments