Skip to content

Commit a7f62a4

Browse files
authored
fix docs/compile.js error (#60)
1 parent d9ef81d commit a7f62a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/compile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function markdown (code) {
146146
*/
147147

148148
function highlight (code, lang) {
149-
if (!hljs.LANGUAGES.hasOwnProperty(lang)) {
149+
if (hljs.listLanguages().indexOf(lang) === -1) {
150150
lang = 'javascript'
151151
}
152152
return hljs.highlight(lang, code).value

0 commit comments

Comments
 (0)