opensource-ny / OpenSource-NY

MIT License
10 stars 14 forks source link

Repo input field takes in a string with spaces in front or in the back will not work #67

Closed yizongk closed 5 years ago

yizongk commented 5 years ago

Entering 'opensource-ny/OpenSource-NY' will fetch PR data.

but entering ' opensource-ny/OpenSource-NY' or 'opensource-ny/OpenSource-NY ' will not work

should have some way to parse those spaces out

yizongk commented 5 years ago

Commit 4eb1644ac28280face0191ad26721b967d996034 sort of fixes it.

Removes not only leading/trailing white spaces, but also white spaces in-between!

So a string such as " ope nsource-ny/OpenSo urce-NY " will be parsed as "opensource-ny.OpenSource-NY"

Will need to fix this.

Chocolate-Spaghet commented 5 years ago

Why do the white spaces in between matter?

yizongk commented 5 years ago

Well, because "open source-ny/OpenSource-NY" is not syntactically considered a valid repo name. But it's up to you guys, this bug just irritates me. I will fix it unless you guys object to it being a bug

Chocolate-Spaghet commented 5 years ago

I think it's a feature, since it doesn't allow for spaces in between. Sometimes you may type a space where you didn't mean to, and this way there is no frustration about missing that. I think 4eb1644 fixes it in a good way.

yizongk commented 5 years ago

alright! Commit 4eb1644ac28280face0191ad26721b967d996034 Fixes this, let's close it. :)