modernize: raw string literals

remotes/origin/0.7.0-dev
Nicolas Werner 5 years ago
parent 7ccc120f63
commit 7dab4d39ee
  1. 6
      src/Config.h

@ -53,9 +53,9 @@ namespace strings {
const QString url_html = "<a href=\"\\1\">\\1</a>";
const QRegularExpression url_regex(
// match an URL, that is not quoted, i.e.
// vvvvvvv match quote via negative lookahead/lookbehind vvvvvv
// vvvv atomic match url -> fail if there is a " before or after vv
"(?<!\")(?>((www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]\\)\\:]))(?!\")");
// vvvvvv match quote via negative lookahead/lookbehind vv
// vvvv atomic match url -> fail if there is a " before or after vvv
R"((?<!")(?>((www\.(?!\.)|[a-z][a-z0-9+.-]*://)[^\s<>'"]+[^!,\.\s<>'"\]\)\:]))(?!"))");
}
// Window geometry.

Loading…
Cancel
Save