recime-message-responder
Advanced tools
Comparing version 2.7.6 to 2.7.7
@@ -98,5 +98,11 @@ "use strict"; | ||
} | ||
const content = JSON.stringify(result); | ||
var content = JSON.stringify(result); | ||
const match = content.match(/{{([a-zA-Z0-9\s]+)}}/ig); | ||
if (match && match.length) { | ||
for (var item of match) { | ||
content = content.replace(item, item.replace(/[\s+]/ig, "_")); | ||
} | ||
} | ||
// remove empty spaces | ||
const template = handlebars_1.default.compile(content.replace(/[\s]+/ig, "")); | ||
const template = handlebars_1.default.compile(content); | ||
const jsonEscape = (str) => { | ||
@@ -103,0 +109,0 @@ return str.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t"); |
{ | ||
"name": "recime-message-responder", | ||
"version": "2.7.6", | ||
"version": "2.7.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -126,5 +126,13 @@ import HandleBars from 'handlebars'; | ||
const content = JSON.stringify(result); | ||
var content = JSON.stringify(result); | ||
const match = content.match(/{{([a-zA-Z0-9\s]+)}}/ig); | ||
if (match && match.length){ | ||
for (var item of match){ | ||
content = content.replace(item, item.replace(/[\s+]/ig, "_")) | ||
} | ||
} | ||
// remove empty spaces | ||
const template = HandleBars.compile(content.replace(/[\s]+/ig, "")); | ||
const template = HandleBars.compile(content); | ||
@@ -131,0 +139,0 @@ const jsonEscape = (str) =>{ |
89639
1396