Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitbook-markdown

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitbook-markdown - npm Package Compare versions

Comparing version 0.3.5 to 0.4.0

17

lib/page.js
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: [

10

package.json
{
"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
}
]
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc