Skip to content

Commit 7cbfa1a

Browse files
committed
Merge pull request #53 from ismith/print_output
Fix printFile to be consistent between console.log and reveal.js print-pdf
2 parents d04411a + 3dca001 commit 7cbfa1a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

bin/server.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ var startMarkdownServer = function(options) {
7373
printFile = sourceFile.replace(/\.md$/, '');
7474
}
7575

76+
// Both the console.log line below and the reveal.js print-pdf plugin
77+
// will append .pdf if it is missing, so let's be consistent and remove
78+
// it here
79+
printFile = printFile.replace(/\.pdf$/, '')
80+
7681
console.log('Attempting to print "' + sourceFile + '" to filename "' + printFile + '.pdf" as PDF');
7782
exec('phantomjs ' + printPluginPath + ' ' + initialFilePath + '?print-pdf' + ' ' + printFile, function(err, stdout, stderr) {
7883
if(err) {

0 commit comments

Comments
 (0)