Skip to content

Commit d2c7636

Browse files
authored
Merge pull request #26 from RichardYan314/patch-2
remove a harmless warning message
2 parents 513cc46 + 947ea9d commit d2c7636

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ var pandocRenderer = function(data, options, callback){
8080
var msg = '';
8181
if (code !== 0)
8282
msg += 'pandoc exited with code '+code+(error ? ': ' : '.');
83+
// remove these two harmless warning messages
84+
// to prevent program from crashing
85+
error = error.replace(
86+
"[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"
87+
,'');
88+
error = error.replace(
89+
"[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"
90+
,'')
8391
if (error)
8492
msg += error;
8593
if (msg)

0 commit comments

Comments
 (0)