Browse Source
Merge pull request #9630 from workgroupengineering/fixes/RegEx
fix: Missing RegEx RegexOptions.Compiled
pull/9694/head
Max Katz
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
src/Avalonia.Base/Media/UnicodeRange.cs
-
src/Avalonia.Remote.Protocol/MetsysBson.cs
|
|
|
@ -104,7 +104,7 @@ namespace Avalonia.Media |
|
|
|
|
|
|
|
public readonly record struct UnicodeRangeSegment |
|
|
|
{ |
|
|
|
private static Regex s_regex = new Regex(@"^(?:[uU]\+)?(?:([0-9a-fA-F](?:[0-9a-fA-F?]{1,5})?))$"); |
|
|
|
private static Regex s_regex = new Regex(@"^(?:[uU]\+)?(?:([0-9a-fA-F](?:[0-9a-fA-F?]{1,5})?))$", RegexOptions.Compiled); |
|
|
|
|
|
|
|
public UnicodeRangeSegment(int start, int end) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -1370,7 +1370,7 @@ namespace Metsys.Bson |
|
|
|
var pattern = ReadName(); |
|
|
|
var optionsString = ReadName(); |
|
|
|
|
|
|
|
var options = RegexOptions.None; |
|
|
|
var options = RegexOptions.Compiled; |
|
|
|
if (optionsString.Contains('e')) options = options | RegexOptions.ECMAScript; |
|
|
|
if (optionsString.Contains('i')) options = options | RegexOptions.IgnoreCase; |
|
|
|
if (optionsString.Contains('l')) options = options | RegexOptions.CultureInvariant; |
|
|
|
|