mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-01 18:35:35 +00:00
rework the rules
This commit is contained in:
@@ -102,11 +102,14 @@ namespace Octokit
|
||||
yield return new String(letters, wordStartIndex, letters.Length - wordStartIndex);
|
||||
}
|
||||
|
||||
static Regex nameWithOwner = new Regex("[a-zA-Z.]{1,}/[a-zA-Z.]{1,}"
|
||||
// the rule:
|
||||
// Username may only contain alphanumeric characters or single hyphens
|
||||
// and cannot begin or end with a hyphen
|
||||
static readonly Regex nameWithOwner = new Regex("[a-z0-9.-]{1,}/[a-z0-9.-]{1,}",
|
||||
#if (!PORTABLE && !NETFX_CORE)
|
||||
, RegexOptions.Compiled
|
||||
RegexOptions.Compiled |
|
||||
#endif
|
||||
);
|
||||
RegexOptions.IgnoreCase);
|
||||
|
||||
internal static bool IsNameWithOwnerFormat(this string input)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user