@@ -30,6 +30,8 @@ public static Regex GetOrAdd([StringSyntax(StringSyntaxAttribute.Regex)] string
3030 [ Common . ObscurePasswordRegexPattern ] = Common . ObscurePasswordRegex ,
3131 [ Common . ExpandTokensRegexPattern ] = Common . ExpandTokensRegex ,
3232 [ Common . SanitizeEnvVarNameRegexPattern ] = Common . SanitizeEnvVarNameRegex ,
33+ [ Common . SanitizeMemberNameRegexPattern ] = Common . SanitizeMemberNameRegex ,
34+ [ Common . SanitizeGitNameRegexPattern ] = Common . SanitizeGitNameRegex ,
3335 [ Configuration . DefaultTagPrefixRegexPattern ] = Configuration . DefaultTagPrefixRegex ,
3436 [ Configuration . DefaultVersionInBranchRegexPattern ] = Configuration . DefaultVersionInBranchRegex ,
3537 [ Configuration . MainBranchRegexPattern ] = Configuration . MainBranchRegex ,
@@ -51,6 +53,7 @@ public static Regex GetOrAdd([StringSyntax(StringSyntaxAttribute.Regex)] string
5153 [ Output . AssemblyVersionRegexPattern ] = Output . AssemblyVersionRegex ,
5254 [ Output . AssemblyInfoVersionRegexPattern ] = Output . AssemblyInfoVersionRegex ,
5355 [ Output . AssemblyFileVersionRegexPattern ] = Output . AssemblyFileVersionRegex ,
56+ [ Output . SanitizeAssemblyInfoRegexPattern ] = Output . SanitizeAssemblyInfoRegex ,
5457 [ Output . CsharpAssemblyAttributeRegexPattern ] = Output . CsharpAssemblyAttributeRegex ,
5558 [ Output . FsharpAssemblyAttributeRegexPattern ] = Output . FsharpAssemblyAttributeRegex ,
5659 [ Output . VisualBasicAssemblyAttributeRegexPattern ] = Output . VisualBasicAssemblyAttributeRegex ,
@@ -107,15 +110,18 @@ internal static partial class Common
107110 /// <summary>
108111 /// Allow alphanumeric, underscore, colon (for custom format specification), hyphen, and dot
109112 /// </summary>
110- [ StringSyntax ( StringSyntaxAttribute . Regex ) ]
113+ [ StringSyntax ( StringSyntaxAttribute . Regex , Options ) ]
111114 internal const string SanitizeEnvVarNameRegexPattern = @"^[A-Za-z0-9_:\-\.]+$" ;
112115
113116 /// <summary>
114117 /// Allow alphanumeric, underscore, and dot for property/field access
115118 /// </summary>
116- [ StringSyntax ( StringSyntaxAttribute . Regex ) ]
119+ [ StringSyntax ( StringSyntaxAttribute . Regex , Options ) ]
117120 internal const string SanitizeMemberNameRegexPattern = @"^[A-Za-z0-9_\.]+$" ;
118121
122+ [ StringSyntax ( StringSyntaxAttribute . Regex , Options ) ]
123+ internal const string SanitizeGitNameRegexPattern = "[^a-zA-Z0-9-]" ;
124+
119125 [ GeneratedRegex ( SwitchArgumentRegexPattern , Options ) ]
120126 public static partial Regex SwitchArgumentRegex ( ) ;
121127
@@ -130,6 +136,9 @@ internal static partial class Common
130136
131137 [ GeneratedRegex ( SanitizeMemberNameRegexPattern , Options ) ]
132138 public static partial Regex SanitizeMemberNameRegex ( ) ;
139+
140+ [ GeneratedRegex ( SanitizeGitNameRegexPattern , Options ) ]
141+ public static partial Regex SanitizeGitNameRegex ( ) ;
133142 }
134143
135144 internal static partial class Configuration
@@ -269,6 +278,9 @@ internal static partial class Output
269278 [ StringSyntax ( StringSyntaxAttribute . Regex ) ]
270279 internal const string SanitizeParticipantRegexPattern = "[^a-zA-Z0-9]" ;
271280
281+ [ StringSyntax ( StringSyntaxAttribute . Regex ) ]
282+ internal const string SanitizeAssemblyInfoRegexPattern = "[^0-9A-Za-z-.+]" ;
283+
272284 [ GeneratedRegex ( AssemblyVersionRegexPattern , Options ) ]
273285 public static partial Regex AssemblyVersionRegex ( ) ;
274286
@@ -289,6 +301,9 @@ internal static partial class Output
289301
290302 [ GeneratedRegex ( SanitizeParticipantRegexPattern , Options ) ]
291303 public static partial Regex SanitizeParticipantRegex ( ) ;
304+
305+ [ GeneratedRegex ( SanitizeAssemblyInfoRegexPattern , RegexOptions . IgnorePatternWhitespace | Options ) ]
306+ public static partial Regex SanitizeAssemblyInfoRegex ( ) ;
292307 }
293308
294309 internal static partial class VersionCalculation
@@ -434,7 +449,7 @@ internal static partial class VisualBasic
434449 [ GeneratedRegex ( TriviaRegexPattern , RegexOptions . Singleline | RegexOptions . IgnorePatternWhitespace | Options ) ]
435450 public static partial Regex TriviaRegex ( ) ;
436451
437- [ GeneratedRegex ( AttributeRegexPattern , RegexOptions . IgnorePatternWhitespace | Options ) ]
452+ [ GeneratedRegex ( AttributeRegexPattern , Options ) ]
438453 public static partial Regex AttributeRegex ( ) ;
439454 }
440455 }
0 commit comments