Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
jdneo merged 2 commits into master from cs/statusbar
Mar 13, 2019
Merged

Conversation

Copy link
Member

@jdneo jdneo commented Mar 12, 2019

Resolve #112

@jdneo jdneo added this to the 0.13.0 milestone Mar 12, 2019
@jdneo jdneo requested review from poppinlp and Vigilans March 12, 2019 12:23
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/;
Copy link
Contributor

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'">
' ×ばつ 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 .?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Contributor

@Vigilans Vigilans left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I neglected the trim() in last review.

@jdneo jdneo merged commit be4f2d5 into master Mar 13, 2019
@jdneo jdneo deleted the cs/statusbar branch March 13, 2019 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@poppinlp poppinlp Awaiting requested review from poppinlp

1 more reviewer

@Vigilans Vigilans Vigilans approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.13.0
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /