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.4.2 to 0.4.3

14

lib/page.js
var _ = require('lodash');
var kramed = require('kramed');
var annotate = require('./annotate');
var annotate = require('kramed/lib/annotate/');

@@ -25,6 +25,9 @@ var RAW_START = "{% raw %}";

el.raw = escape(el.raw);
} else if (el.type == 'rawStart') {
levelRaw = levelRaw + 1;
} else if (el.type == 'rawEnd') {
levelRaw = 0;
} else if (el.type == 'tplexpr') {
var expr = el.matches[0];
if(expr === 'raw') {
levelRaw = levelRaw + 1;
} else if(expr === 'endraw') {
levelRaw = 0;
}
}

@@ -35,3 +38,2 @@ return el;

var escaped = lexed
.map(function(el) {

@@ -38,0 +40,0 @@ // Only escape paragraphs and headings

{
"name": "gitbook-markdown",
"version": "0.4.2",
"version": "0.4.3",
"homepage": "https://www.gitbook.com",

@@ -9,3 +9,3 @@ "description": "Parse markdown content for gitbook",

"lodash": "^3.2.0",
"kramed": "0.4.6",
"kramed": "0.5.0",
"kramed-text-renderer": "0.2.1"

@@ -12,0 +12,0 @@ },

@@ -62,2 +62,7 @@ var fs = require('fs');

);
assert.equal(
page.prepare('```\ntest\n```\n\n\n### Test'),
'{% raw %}```\ntest\n```\n{% endraw %}\n\n### Test'
);
});

@@ -64,0 +69,0 @@

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