Fix perf regression in non-autolinks
Before, this was compiling the regex on every single item in the crate. This would have been caught by `clippy::declare_interior_mutable_const`.
This commit is contained in:
parent
bc66b92f7f
commit
8c7b7dd041
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ crate const CHECK_BARE_URLS: Pass = Pass {
|
|||
description: "detects URLs that are not hyperlinks",
|
||||
};
|
||||
|
||||
const URL_REGEX: SyncLazy<Regex> = SyncLazy::new(|| {
|
||||
static URL_REGEX: SyncLazy<Regex> = SyncLazy::new(|| {
|
||||
Regex::new(concat!(
|
||||
r"https?://", // url scheme
|
||||
r"([-a-zA-Z0-9@:%._\+~#=]{2,256}\.)+", // one or more subdomains
|
||||
|
|
Loading…
Reference in a new issue