gitbook-markdown
Advanced tools
Comparing version 0.4.2 to 0.4.3
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 @@ |
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
19324
22
471
+ Addedkramed@0.5.0(transitive)
- Removedkramed@0.4.6(transitive)
Updatedkramed@0.5.0