fix: allow backtick in HTML templates as well

This commit is contained in:
Sagar Vora 2022-10-11 13:22:13 +05:30
parent bfbdaa4f4d
commit 2f96458bcb

View file

@ -18,9 +18,9 @@ module.exports = {
return fs
.readFile(filepath, "utf-8")
.then((content) => {
content = scrub_html_template(content);
content = JSON.stringify(scrub_html_template(content));
return {
contents: `\n\tfrappe.templates['${filename}'] = \`${content}\`;\n`,
contents: `\n\tfrappe.templates['${filename}'] = ${content};\n`,
watchFiles: [filepath],
};
})