You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The Go implementation of TagExpressions escapes parentheses even if there are other characters between the backslash and the parentheses, such as (@foo or @\bar)
Expected behavior
Only the parentheses immediately after the backslash are escaped.
expr1, err1=Parse("(@foo or @\bar)") // successexpr1.Evaluate([]string{"@bar"}) // return trueexpr2, err2=Parse("@foo or @\bar)") // return error "Syntax error. Unmatched )"
Current behavior
The parentheses are escaped even if there are other characters between the backslash and the parentheses.
expr1, err1=Parse("(@foo or @\bar)") // should success, but return error "Syntax error. Unmatched ("expr2, err2=Parse("@foo or @\bar)") // should return error "Syntax error. Unmatched )", but successexpr2.Evaluate([]string{"@bar"}) // return falseexpr2.Evaluate([]string{"@bar)"}) // return true
Your Environment
Tag Expressions 4.0.0
The text was updated successfully, but these errors were encountered:
Describe the bug
The Go implementation of TagExpressions escapes parentheses even if there are other characters between the backslash and the parentheses, such as
(@foo or @\bar)
Expected behavior
Only the parentheses immediately after the backslash are escaped.
Current behavior
The parentheses are escaped even if there are other characters between the backslash and the parentheses.
Your Environment
The text was updated successfully, but these errors were encountered: