diff --git a/lib/utils/binding-parser.html b/lib/utils/binding-parser.html
index 11dd49f6d7..e92a3cc32e 100644
--- a/lib/utils/binding-parser.html
+++ b/lib/utils/binding-parser.html
@@ -95,20 +95,13 @@
/* eslint-disable no-fallthrough */
const STATE = {
- INITIAL: bindingData => {
- let escaped = false;
- return char => {
- if (char === '\\') {
- escaped = true;
- } else if ((char === '{' || char === '[') && !escaped) {
- return STATE.FIRSTOPENINGBINDING({
- mode: char,
- dependencies: [],
- startChar: bindingData.startChar
- });
- } else {
- escaped = false;
- }
+ INITIAL: bindingData => char => {
+ if ((char === '{' || char === '[')) {
+ return STATE.FIRSTOPENINGBINDING({
+ mode: char,
+ dependencies: [],
+ startChar: bindingData.startChar
+ });
}
},
FIRSTOPENINGBINDING: bindingData => (char, i) => {
@@ -120,11 +113,13 @@
return STATE.INITIAL({});
},
FIRSTCHARACTERBINDING: (bindingData) => char => {
- if (char === '!') {
- bindingData.negate = true;
- bindingData.startChar = i + 1;
+ if (char !== ' ' && char !== '\t' && char !== '\n') {
+ if (char === '!') {
+ bindingData.negate = true;
+ bindingData.startChar = i + 1;
+ }
+ return STATE.BINDING(bindingData)
}
- return STATE.BINDING(bindingData)
},
BINDING: bindingData => (char, i) => {
switch (char) {
diff --git a/test/unit/property-effects-elements.html b/test/unit/property-effects-elements.html
index 83c53514b9..e06574cebe 100644
--- a/test/unit/property-effects-elements.html
+++ b/test/unit/property-effects-elements.html
@@ -86,7 +86,6 @@
{{objectWithNonEnglishUnicode.商品名}}
foo(field, true): {{computeWithBoolean(otherValue, true)}}
foo(field, false): {{computeWithBoolean(otherValue, false)}}
- \{{escapeBinding}}\[[escapeBinding2]]