Skip to content

Commit

Permalink
Merge pull request #26 from RichardYan314/patch-2
Browse files Browse the repository at this point in the history
remove a harmless warning message
  • Loading branch information
wzpan committed Feb 5, 2019
2 parents 513cc46 + 947ea9d commit d2c7636
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ var pandocRenderer = function(data, options, callback){
var msg = '';
if (code !== 0)
msg += 'pandoc exited with code '+code+(error ? ': ' : '.');
// remove these two harmless warning messages
// to prevent program from crashing
error = error.replace(
"[WARNING] This document format requires a nonempty <title> element.\r\n Please specify either 'title' or 'pagetitle' in the metadata.\r\n Falling back to 'Untitled'\r\n"
,'');
error = error.replace(
"[WARNING] This document format requires a nonempty <title> element.\r\n Please specify either 'title' or 'pagetitle' in the metadata,\r\n e.g. by using --metadata pagetitle=\"...\" on the command line.\r\n Falling back to 'Untitled'\r\n"
,'')
if (error)
msg += error;
if (msg)
Expand Down

0 comments on commit d2c7636

Please sign in to comment.