//! Default URL/path regex (port of `config/url.zig`). //! //! The pattern uses Oniguruma (Ruby syntax) features such as variable-length //! lookbehind; use the `onig` crate to compile it. use const_format::concatcp; const URL_SCHEMES: &str = r"https?://|mailto:|ftp://|file:|ssh:|git://|ssh://|tel:|magnet:|ipfs://|ipns://|gemini://|gopher://|news:"; const IPV6_URL_PATTERN: &str = r"(?:\[[:0-9a-fA-F]+(?:[:0-9a-fA-F]*)+\](?::[0-9]+)?)"; const SCHEME_URL_CHARS: &str = r"[\w\-.~:/?#@!$&*+,;=%]"; const PATH_CHARS: &str = r"[\w\-.~:\/?#@!$&*+;=%]"; const OPTIONAL_BRACKETED_WORD_SUFFIX: &str = r"(?:[\(\[]\w*[\)\]])?"; const NO_TRAILING_PUNCTUATION: &str = r"(?