Handlebars.registerHelper('splitText', function (aString) { if (aString.includes("/")) { var c = aString.split("/").map((el) => { return "
" + el + "
"; }).join(''); return "
" + c + "
"; } if (aString.length == 0 || aString === " ") { aString = "  "; } //return aString; return "
" + aString + "
"; }); Handlebars.registerHelper('ifEquals', function(arg1, arg2, options) { return (arg1 == arg2) ? options.fn(this) : options.inverse(this); });