summary refs log tree commit diff
path: root/include/Config.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-24 13:13:07 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-24 13:13:07 +0200
commit6835a97b15f642829ffe168464aeb1eae8f7b6a9 (patch)
tree946f7d34f06eb9b5106a31ac86d25df6d6a845a8 /include/Config.h
parentFix deploy conditionals (diff)
downloadnheko-6835a97b15f642829ffe168464aeb1eae8f7b6a9.tar.xz
Use a better regex to identify URLs
Diffstat (limited to 'include/Config.h')
-rw-r--r--include/Config.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/Config.h b/include/Config.h

index 781e910c..805e7c02 100644 --- a/include/Config.h +++ b/include/Config.h
@@ -1,5 +1,8 @@ #pragma once +#include <QRegExp> +#include <QString> + // Non-theme app configuration. Layouts, fonts spacing etc. // // Font sizes are in pixels. @@ -16,6 +19,12 @@ namespace dialogs { static constexpr int labelSize = 15; } +namespace strings { +static const QString url_html = "<a href=\"\\1\">\\1</a>"; +static const QRegExp url_regex( + "((www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]\\)\\:])"); +} + // Window geometry. namespace window { static constexpr int height = 600;