From db105e865000943fd7134b8a8278da871e34679b Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 15 Nov 2021 03:15:57 -0500 Subject: [PATCH] ImportHtml: Get the logger once --- src/node/utils/ImportHtml.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/utils/ImportHtml.js b/src/node/utils/ImportHtml.js index 2749977d6..fc6a95bde 100644 --- a/src/node/utils/ImportHtml.js +++ b/src/node/utils/ImportHtml.js @@ -22,9 +22,9 @@ const jsdom = require('jsdom'); const rehype = require('rehype'); const minifyWhitespace = require('rehype-minify-whitespace'); -exports.setPadHTML = async (pad, html) => { - const apiLogger = log4js.getLogger('ImportHtml'); +const apiLogger = log4js.getLogger('ImportHtml'); +exports.setPadHTML = async (pad, html) => { rehype() .use(minifyWhitespace, {newlines: false}) .process(html, (err, output) => {