templates: Suppress Handlebars automatic partial indentation.

Fixes #12795.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-07-16 14:20:23 -07:00
committed by Tim Abbott
parent 07f93d58a3
commit b1aa304c4a
3 changed files with 7 additions and 3 deletions

View File

@@ -14,7 +14,10 @@ module.exports.make_handlebars = () => {
const name = "$" + path.relative(templates_path, filename);
if (!compiled.has(name)) {
compiled.add(name);
hb.registerPartial(name, hb.compile(fs.readFileSync(filename, "utf-8"), { zjsFilename: filename }));
hb.registerPartial(
name,
hb.compile(fs.readFileSync(filename, "utf-8"), { preventIndent: true, zjsFilename: filename })
);
}
return name;
};