-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support like escape #360
support like escape #360
Conversation
i-- | ||
c = '\\' | ||
c = escape | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about i==len(pattern)-1 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just use the old code here, which just seems using the origin escape character directly.
I have added a comment that we will add more tests later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the escape is the last character in the pattern, the match type would be exact match.
LGTM |
1 similar comment
LGTM |
Signed-off-by: disksing <[email protected]>
* standby for 7.1 Signed-off-by: zeminzhou <[email protected]> * standby for 7.1 Signed-off-by: zeminzhou <[email protected]> * update standby condition (pingcap#360) Signed-off-by: disksing <[email protected]> * make check Signed-off-by: zeminzhou <[email protected]> * make check Signed-off-by: zeminzhou <[email protected]> * Update standby/standby.go Co-authored-by: tidbcloud-bot <[email protected]> * Update standby/idle_watcher.go Co-authored-by: tidbcloud-bot <[email protected]> * make check Signed-off-by: zeminzhou <[email protected]> --------- Signed-off-by: zeminzhou <[email protected]> Signed-off-by: disksing <[email protected]> Co-authored-by: disksing <[email protected]> Co-authored-by: tidbcloud-bot <[email protected]>
Fix #344