[REF] qweb: drop support of #{.} string interpolation

We only support the {{.}} syntax.

Part of #128
This commit is contained in:
Aaron Bohy
2019-06-07 08:58:02 +02:00
committed by Géry Debongnie
parent e14a4fe338
commit b14d069ee7
4 changed files with 8 additions and 34 deletions
+2 -2
View File
@@ -485,7 +485,7 @@ describe("attributes", () => {
});
test("format expression, other format", () => {
qweb.addTemplate("test", `<div t-attf-foo="#{value + 37}"/>`);
qweb.addTemplate("test", `<div t-attf-foo="{{value + 37}}"/>`);
const result = renderToString(qweb, "test", { value: 5 });
expect(result).toBe(`<div foo="42"></div>`);
});
@@ -530,7 +530,7 @@ describe("attributes", () => {
});
test("class and t-attf-class with ternary operation", () => {
qweb.addTemplate("test", `<div class="hello" t-attf-class="#{value ? 'world' : ''}"/>`);
qweb.addTemplate("test", `<div class="hello" t-attf-class="{{value ? 'world' : ''}}"/>`);
const result = renderToString(qweb, "test", { value: true });
expect(result).toBe(`<div class="hello world"></div>`);
});