Skip to content

Commit

Permalink
Fix docs compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
lutangar committed Dec 2, 2021
1 parent cad53d2 commit e4ac2ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ build
node-addon-api

prebuilds/

docs/index.html
6 changes: 3 additions & 3 deletions docs/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

var fs = require('fs')
var dox = require('dox')
var jade = require('jade')
var jade = require('pug')
var marked = require('marked')
var hljs = require('highlight.js')
var assert = require('assert')
Expand Down Expand Up @@ -146,8 +146,8 @@ function markdown (code) {
*/

function highlight (code, lang) {
if (!hljs.LANGUAGES.hasOwnProperty(lang)) {
if (!hljs.listLanguages().hasOwnProperty(lang)) {
lang = 'javascript'
}
return hljs.highlight(lang, code).value
return hljs.highlight(code, { language: lang }).value
}

0 comments on commit e4ac2ed

Please sign in to comment.