From d4536d47aeac58d93c9cbf83bf606b698afebe8e Mon Sep 17 00:00:00 2001 From: Pomax Date: Sat, 27 Jun 2020 10:48:17 -0700 Subject: [PATCH] buffer --- lib/latex-loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' });