1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-12 23:45:57 +00:00

Adding in page ids to allow for hyperlinking

This commit is contained in:
Scott Tolksdorf
2016-06-10 12:16:46 -04:00
parent cd97b22067
commit ead975b605
6 changed files with 18 additions and 7 deletions

View File

@@ -119,8 +119,8 @@ app.get('/print/:id', function(req, res){
brew = objs[0];
}
var content = _.map(brew.text.split('\\page'), function(pageText){
return '<div class="phb print">' + Markdown.render(pageText) + '</div>';
var content = _.map(brew.text.split('\\page'), function(pageText, index){
return `<div class="phb print" id="p${index+1}">` + Markdown.render(pageText) + '</div>';
}).join('\n');
var dialog = '';