[FIX] qweb: support #{} syntax in attribute string interpolation

closes #113
This commit is contained in:
Géry Debongnie
2019-05-17 16:14:54 +02:00
parent a1e982aba5
commit a1d7e6c987
4 changed files with 42 additions and 7 deletions
+6
View File
@@ -511,6 +511,12 @@ describe("attributes", () => {
expect(result).toBe(`<div foo="42"></div>`);
});
test("format expression, other format", () => {
qweb.addTemplate("test", `<div t-attf-foo="#{value + 37}"/>`);
const result = renderToString(qweb, "test", { value: 5 });
expect(result).toBe(`<div foo="42"></div>`);
});
test("format multiple", () => {
qweb.addTemplate(
"test",