Evaluate the channel name as a regex#14
Open
oliwer wants to merge 2 commits intorockymadden:masterfrom
Open
Conversation
This allows the user to write `somafm listen groove` instead of `somafm listen groovesalad`. It's very convenient. The regex forces the user to write the first letters of the channel, it cannot match the middle or the end. This is voluntary and should help avoiding unexpected results.
Owner
|
@oliwer Love it. Are there any instances where a channel name is the prefix of another? I can't think of one off hand. |
This guaranties we get the right result in case a channel name is the same as another channel prefix. Also limit the number of results to 1.
Author
|
You're right. There is little chance this may ever happen, but I modified the condition to make sure it never happens! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows the user to write
somafm listen grooveinstead ofsomafm listen groovesalad. It's very convenient. The regex forces the user to write the first letters of the channel, it cannot matchthe middle or the end. This is voluntary and should help avoiding unexpected results.