gitbook-markdown
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -6,18 +6,5 @@ var _ = require("lodash"); | ||
var parseLangs = function(content) { | ||
var entries = parseEntries(content); | ||
return _.chain(entries) | ||
.filter(function(entry) { | ||
return Boolean(entry.path); | ||
}) | ||
.map(function(entry) { | ||
return { | ||
title: entry.title, | ||
path: entry.path, | ||
lang: entry.path.replace("/", "") | ||
}; | ||
}) | ||
.value(); | ||
return parseEntries(content); | ||
}; | ||
module.exports = parseLangs; |
{ | ||
"name": "gitbook-markdown", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"homepage": "https://www.gitbook.com", | ||
@@ -5,0 +5,0 @@ "description": "Parse markdown content for gitbook", |
@@ -13,9 +13,7 @@ var fs = require('fs'); | ||
assert.equal(LEXED[0].path,'en/'); | ||
assert.equal(LEXED[0].lang,'en'); | ||
assert.equal(LEXED[0].title,'English'); | ||
assert.equal(LEXED[1].path,'fr/'); | ||
assert.equal(LEXED[1].lang,'fr'); | ||
assert.equal(LEXED[1].title,'French'); | ||
}); | ||
}); |
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
13634
331