gitbook-markdown
Advanced tools
Comparing version 0.3.5 to 0.4.0
var _ = require('lodash'); | ||
var kramed = require('kramed'); | ||
var hljs = require('highlight.js'); | ||
@@ -54,18 +53,4 @@ var lnormalize = require('./utils/lang').normalize; | ||
function parsePage(src) { | ||
var options = _.extend({}, kramed.defaults, { | ||
// Synchronous highlighting with highlight.js | ||
highlight: function (code, lang) { | ||
if(!lang || !hljs) return code; | ||
var options = _.extend({}, kramed.defaults); | ||
// Normalize lang | ||
lang = lnormalize(lang); | ||
try { | ||
return hljs.highlight(lang, code).value; | ||
} catch(e) { } | ||
return code; | ||
} | ||
}); | ||
return { | ||
@@ -72,0 +57,0 @@ sections: [ |
{ | ||
"name": "gitbook-markdown", | ||
"version": "0.3.5", | ||
"version": "0.4.0", | ||
"homepage": "https://www.gitbook.com", | ||
@@ -10,4 +10,3 @@ "description": "Parse markdown content for gitbook", | ||
"kramed": "0.4.6", | ||
"kramed-text-renderer": "0.2.1", | ||
"highlight.js": "8.4.0" | ||
"kramed-text-renderer": "0.2.1" | ||
}, | ||
@@ -38,6 +37,3 @@ "devDependencies": { | ||
} | ||
], | ||
"browser": { | ||
"highlight.js": false | ||
} | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
24130
578
- Removedhighlight.js@8.4.0
- Removedhighlight.js@8.4.0(transitive)