- Notifications
You must be signed in to change notification settings - Fork669
[bugfix] Correct the content shown in status-bar#202
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/leetCodeManager.ts Outdated
private tryParseUserName(output: string): string { | ||
const lines: string[] = output.trim().split(/\r?\n/); | ||
if (lines.length === 3) { | ||
const reg: RegExp = /^\s*.{1}\s*(.+)\s*https:\/\/leetcode/; |
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.
The regex executing on
' × vigilans https://leetcode-cn.com'
will return
'vigilans '
Append?
to.+
to prevent greedy match could solve the problem.
Besides, is there any difference between.{1}
and.
?
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.
Updated
Vigilans left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
LGTM. I neglected thetrim()
in last review.
Resolve#112