[Xfce4-commits] [apps/xfce4-terminal] 01/01: Update regex definitions from gnome-terminal
noreply at xfce.org
noreply at xfce.org
Wed Dec 20 15:51:29 CET 2017
This is an automated email from the git hooks/post-receive script.
f 2 4 0 4 p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-terminal.
commit 3e77d8c708e12ca8db5441005e4bfec04c060077
Author: Igor <f2404 at yandex.ru>
Date: Wed Dec 20 09:47:11 2017 -0500
Update regex definitions from gnome-terminal
Disallow terminating semicolon in URLs
Allow balanced pairs of square brackets in URLs (https://bugzilla.gnome.org/show_bug.cgi?id=763980#c8)
---
terminal/terminal-regex.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/terminal/terminal-regex.h b/terminal/terminal-regex.h
index be0e2b7..2ed28d7 100644
--- a/terminal/terminal-regex.h
+++ b/terminal/terminal-regex.h
@@ -125,12 +125,12 @@
/* Omit the parentheses, see below */
#define PATHCHARS_CLASS "[-[:alnum:]\\Q_$.+!*,:;@&=?/~#|%\\E]"
/* Chars to end a URL */
-#define PATHTERM_CLASS "[-[:alnum:]\\Q_$+*:;@&=/~#|%\\E]"
+#define PATHTERM_CLASS "[-[:alnum:]\\Q_$+*:@&=/~#|%\\E]"
-/* Recursive definition of PATH that allows parentheses only if balanced, see bug 763980. */
-#define PATH_INNER_DEF "(?(DEFINE)(?<PATH_INNER>(?x: (?: " PATHCHARS_CLASS "* \\( (?&PATH_INNER) \\) )* " PATHCHARS_CLASS "* )))"
+/* Recursive definition of PATH that allows parentheses and square brackets only if balanced, see bug 763980. */
+#define PATH_INNER_DEF "(?(DEFINE)(?<PATH_INNER>(?x: (?: " PATHCHARS_CLASS "* (?: \\( (?&PATH_INNER) \\) | \\[ (?&PATH_INNER) \\] ) )* " PATHCHARS_CLASS "* )))"
/* Same as above, but the last character (if exists and is not a parenthesis) must be from PATHTERM_CLASS. */
-#define PATH_DEF "(?(DEFINE)(?<PATH>(?x: (?: " PATHCHARS_CLASS "* \\( (?&PATH_INNER) \\) )* (?: " PATHCHARS_CLASS "* " PATHTERM_CLASS " )? )))"
+#define PATH_DEF "(?(DEFINE)(?<PATH>(?x: (?: " PATHCHARS_CLASS "* (?: \\( (?&PATH_INNER) \\) | \\[ (?&PATH_INNER) \\] ) )* (?: " PATHCHARS_CLASS "* " PATHTERM_CLASS " )? )))"
#define URLPATH "(?x: /(?&PATH) )?"
#define VOIP_PATH "(?x: [;?](?&PATH) )?"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list