mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] qweb: drop support of #{.} string interpolation
We only support the {{.}} syntax.
Part of #128
This commit is contained in:
committed by
Géry Debongnie
parent
e14a4fe338
commit
b14d069ee7
+4
-8
@@ -777,15 +777,11 @@ export class Context {
|
||||
if (matches && matches[0].length === s.length) {
|
||||
return `(${this.formatExpression(s.slice(2, -2))})`;
|
||||
}
|
||||
matches = s.match(/\#\{.*?\}/g);
|
||||
if (matches && matches[0].length === s.length) {
|
||||
return `(${this.formatExpression(s.slice(2, -1))})`;
|
||||
}
|
||||
|
||||
let formatter = expr => "${" + this.formatExpression(expr) + "}";
|
||||
let r = s
|
||||
.replace(/\{\{.*?\}\}/g, s => formatter(s.slice(2, -2)))
|
||||
.replace(/\#\{.*?\}/g, s => formatter(s.slice(2, -1)));
|
||||
let r = s.replace(
|
||||
/\{\{.*?\}\}/g,
|
||||
s => "${" + this.formatExpression(s.slice(2, -2)) + "}"
|
||||
);
|
||||
return "`" + r + "`";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user