mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-28 08:34:06 +02:00
Remove RegexOptions.Compiled where not needed
This commit is contained in:
parent
19f104239a
commit
2459d31bff
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace TweetDuck.Core.Handling{
|
namespace TweetDuck.Core.Handling{
|
||||||
class RequestHandlerBase : DefaultRequestHandler{
|
class RequestHandlerBase : DefaultRequestHandler{
|
||||||
private static readonly Regex TweetDeckResourceUrl = new Regex(@"/dist/(.*?)\.(.*?)\.(css|js)$", RegexOptions.Compiled);
|
private static readonly Regex TweetDeckResourceUrl = new Regex(@"/dist/(.*?)\.(.*?)\.(css|js)$");
|
||||||
private static readonly SortedList<string, string> TweetDeckHashes = new SortedList<string, string>(4);
|
private static readonly SortedList<string, string> TweetDeckHashes = new SortedList<string, string>(4);
|
||||||
|
|
||||||
public static void LoadResourceRewriteRules(string rules){
|
public static void LoadResourceRewriteRules(string rules){
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace TweetLib.Core.Features.Twitter{
|
namespace TweetLib.Core.Features.Twitter{
|
||||||
public class ImageUrl{
|
public class ImageUrl{
|
||||||
private static readonly Regex RegexImageUrlParams = new Regex(@"(format|name)=(\w+)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
private static readonly Regex RegexImageUrlParams = new Regex(@"(format|name)=(\w+)", RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
public static readonly string[] ValidExtensions = {
|
public static readonly string[] ValidExtensions = {
|
||||||
".jpg", ".jpeg", ".png", ".gif"
|
".jpg", ".jpeg", ".png", ".gif"
|
||||||
|
@ -7,8 +7,7 @@ public static class TwitterUrls{
|
|||||||
public const string TweetDeck = "https://tweetdeck.twitter.com";
|
public const string TweetDeck = "https://tweetdeck.twitter.com";
|
||||||
private const string TwitterTrackingUrl = "t.co";
|
private const string TwitterTrackingUrl = "t.co";
|
||||||
|
|
||||||
private static readonly Lazy<Regex> RegexAccountLazy = new Lazy<Regex>(() => new Regex(@"^https?://twitter\.com/(?!signup$|tos$|privacy$|search$|search-)([^/?]+)/?$", RegexOptions.Compiled), false);
|
public static Regex RegexAccount { get; } = new Regex(@"^https?://twitter\.com/(?!signup$|tos$|privacy$|search$|search-)([^/?]+)/?$");
|
||||||
public static Regex RegexAccount => RegexAccountLazy.Value;
|
|
||||||
|
|
||||||
public static bool IsTweetDeck(string url){
|
public static bool IsTweetDeck(string url){
|
||||||
return url.Contains("//tweetdeck.twitter.com/");
|
return url.Contains("//tweetdeck.twitter.com/");
|
||||||
|
Loading…
Reference in New Issue
Block a user