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'

View File

@ -22,8 +22,7 @@
"split": "^1.0.0",
"mkdirp": "^0.5.1",
"nomnoml": "^0.0.3",
"canvas": "^1.2.7",
"doctoc": "0.15.0"
"canvas": "^1.2.7"
},
"scripts": {
"start": "node app.js",
@ -31,9 +30,8 @@
"jshint": "jshint platform example || exit 0",
"watch": "karma start",
"jsdoc": "jsdoc -c jsdoc.json -r -d target/docs/api",
"doctoc": "doctoc docs/src",
"otherdoc": "node docs/gendocs.js --in docs/src --out target/docs",
"docs": "npm run jsdoc ; npm run doctoc; npm run otherdoc"
"docs": "npm run jsdoc ; npm run otherdoc"
},
"repository": {
"type": "git",