gitbook-asciidoc
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -8,3 +8,3 @@ var _ = require('lodash'); | ||
var html = convert(src); | ||
$ = cheerio.load(html); | ||
var $ = cheerio.load(html); | ||
@@ -11,0 +11,0 @@ var entries = []; |
@@ -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; |
@@ -8,3 +8,3 @@ var _ = require('lodash'); | ||
var html = convert(src); | ||
$ = cheerio.load(html); | ||
var $ = cheerio.load(html); | ||
@@ -11,0 +11,0 @@ return { |
@@ -46,3 +46,3 @@ var _ = require('lodash'); | ||
var html = convert(src); | ||
$ = cheerio.load(html); | ||
var $ = cheerio.load(html); | ||
@@ -49,0 +49,0 @@ var chapters = parseList($("ol").first(), $); |
{ | ||
"name": "gitbook-asciidoc", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"homepage": "https://www.gitbook.com", | ||
@@ -5,0 +5,0 @@ "description": "Parse AsciiDoc 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
10408
21
212