diff --git a/lib/latex-loader.js b/lib/latex-loader.js index 7a79bd7f..e181d216 100644 --- a/lib/latex-loader.js +++ b/lib/latex-loader.js @@ -38,7 +38,7 @@ var options = { // And only generate if the file doesn't already exist, of course. if (!fs.existsSync(destination)) { - var cmdarg = new Buffer(latex).toString("base64"); + var cmdarg = Buffer.from(latex).toString("base64"); var cmd = "npm run latex -- --hash " + hash + " --base64 " + cmdarg; console.log(" generating " + hash + ".svg"); execSync(cmd, { stdio: 'inherit' });