roll back TOC generation

This commit is contained in:
Andrew Henry
2015-10-20 21:12:14 -07:00
parent 9d17768327
commit 93f8e61c40
2 changed files with 2 additions and 20 deletions

View File

@ -117,21 +117,6 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
};
return transform;
}
function strip() {
var patternsToStrip = [
"^<!--"],
transform = new stream.Transform({ objectMode: true });
transform._transform = function (chunk, encoding, done) {
//If chunk does not match pattern, keep it, else discard (by not
// pushing into stream)
if (!chunk.trim().match(patternsToStrip.join("|"))){
this.push(chunk);
}
done();
};
return transform;
}
// Custom renderer for marked; converts relative links from md to html,
// and makes headings linkable.
@ -182,7 +167,6 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
fs.createReadStream(file, { encoding: 'utf8' })
.pipe(split())
.pipe(nomnomlifier(destPath, prefix))
.pipe(strip())
.pipe(gfmifier())
.pipe(fs.createWriteStream(destination, {
encoding: 'utf8'