From 7bec901d9c0a781e896dd3394e464d93d5ad2caf Mon Sep 17 00:00:00 2001 From: Joseph Rautenbach Date: Fri, 8 Mar 2019 14:12:01 +0200 Subject: [PATCH] Trim whitespace --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index e78cd11..a9bcefa 100644 --- a/app.js +++ b/app.js @@ -78,7 +78,7 @@ app.post('/convert', function (req, res) { shell.mkdir(`${tempDirRoot}${id}`); - var document = documentTemplate.replace('EQUATION', req.body.latexInput); + var document = documentTemplate.replace('EQUATION', req.body.latexInput.trim()); fs.writeFileSync(`${tempDirRoot}${id}/equation.tex`, document); // Write generated .tex file var result = {};