Skip to content
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

Fixed #59368 #70167

Merged
merged 3 commits into from Mar 29, 2019
Merged

Fixed #59368 #70167

merged 3 commits into from Mar 29, 2019

Conversation

irrationalRock
Copy link
Contributor

This PR fixes: #59378.

It adds regex validation to the terminal.

if (value.length === 0) {
return null;
}
if (!this._findInput.getRegex()) {

Choose a reason for hiding this comment

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

What do you think about to put both of those conditions in one if with an OR statement?

}
try {
/* tslint:disable:no-unused-expression */
new RegExp(value);
Copy link

Choose a reason for hiding this comment

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

tip: is more simple use tslint:disable-next-line:no-unused-expression instead disable and enable next 🙂

@irrationalRock
Copy link
Contributor Author

Thanks for the suggestions,

I also applied these changes to FindWidget.

@alexdima alexdima assigned rebornix and unassigned alexdima Mar 27, 2019
@alexdima
Copy link
Member

alexdima commented Mar 27, 2019

Hey @joaomoreno , @rebornix owns the find widget since around 2 years.

@rebornix rebornix added this to the On Deck milestone Mar 28, 2019
Copy link
Member

@rebornix rebornix left a comment

Choose a reason for hiding this comment

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

@irrationalRock thanks for your contribution!

@rebornix rebornix merged commit b71932d into microsoft:master Mar 29, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No regex validator for terminal find widget
4 participants