0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-13 15:12:43 +00:00

Work on the Table of contents snippet

This commit is contained in:
Scott Tolksdorf
2017-03-19 17:26:55 -04:00
parent c647bdf5ee
commit 28a3f31caa
9 changed files with 242 additions and 44 deletions

View File

@@ -48,7 +48,7 @@ const getTOC = (pages) => {
}
module.exports = function(brew){
const pages = brew.split('\\page');
const TOC = getTOC(pages);
const markdown = _.reduce(TOC, (r, g1, idx1)=>{
r.push(`- **[${idx1 + 1} ${g1.title}](#p${g1.page})**`)