move url_regex to a header
This commit is contained in:
parent
8200137f5d
commit
e7acfc1635
|
@ -9,10 +9,9 @@
|
||||||
#include <vte/vte.h>
|
#include <vte/vte.h>
|
||||||
#include <vte/vteaccess.h>
|
#include <vte/vteaccess.h>
|
||||||
|
|
||||||
#define CSI "\x1b["
|
#include "url_regex.h"
|
||||||
|
|
||||||
// http://blog.dieweltistgarnichtso.net/constructing-a-regular-expression-that-matches-uris
|
#define CSI "\x1b["
|
||||||
static const char * const url_regex = R"XXX(((?<=\()[A-Za-z][A-Za-z0-9\+\.\-]*:([A-Za-z0-9\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+(?=\)))|([A-Za-z][A-Za-z0-9\+\.\-]*:([A-Za-z0-9\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+))XXX";
|
|
||||||
|
|
||||||
enum class overlay_mode {
|
enum class overlay_mode {
|
||||||
hidden,
|
hidden,
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#ifndef URL_REGEX
|
||||||
|
#define URL_REGEX
|
||||||
|
const char * const url_regex = R"XXX(((?<=\()[A-Za-z][A-Za-z0-9\+\.\-]*:([A-Za-z0-9\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+(?=\)))|([A-Za-z][A-Za-z0-9\+\.\-]*:([A-Za-z0-9\.\-_~:/\?#\[\]@!\$&'\(\)\*\+,;=]|%[A-Fa-f0-9]{2})+))XXX";
|
||||||
|
#endif
|
Loading…
Reference in New Issue