Skip to content

Commit

Permalink
Merge pull request #53 from ismith/print_output
Browse files Browse the repository at this point in the history
Fix printFile to be consistent between console.log and reveal.js print-pdf
  • Loading branch information
webpro committed Dec 30, 2015
2 parents d04411a + 3dca001 commit 7cbfa1a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ var startMarkdownServer = function(options) {
printFile = sourceFile.replace(/\.md$/, '');
}

// Both the console.log line below and the reveal.js print-pdf plugin
// will append .pdf if it is missing, so let's be consistent and remove
// it here
printFile = printFile.replace(/\.pdf$/, '')

console.log('Attempting to print "' + sourceFile + '" to filename "' + printFile + '.pdf" as PDF');
exec('phantomjs ' + printPluginPath + ' ' + initialFilePath + '?print-pdf' + ' ' + printFile, function(err, stdout, stderr) {
if(err) {
Expand Down

0 comments on commit 7cbfa1a

Please sign in to comment.