[patch] slightly better gnome-terminal regexps



Hi.

As the subject implies, this adds few things to the gnome-terminal
regexps (for the so called "dingus clicking").  First, it makes sure
that there is a dot after the www or ftp.  This eliminates some spurious
underlines.  It also adds regexps which recognize urls which end in
.com, .org, or .net without needing the http:// at the beginning.

Cheers,
Chris

Please cc: me as I'm not the lists.

-- 
pick, pack, pock, puck: like drops of water in a fountain falling
softly in the brimming bowl.
--- gnome-terminal.c.orig	Sun Jul  2 11:08:17 2000
+++ gnome-terminal.c	Sun Jul  2 11:24:28 2000
@@ -2170,8 +2170,10 @@
 				  GTK_SIGNAL_FUNC (set_hints), term);
 
 #ifdef ZVT_TERM_MATCH_SUPPORT
-	zvt_term_match_add( ZVT_TERM(term), "(((news|telnet|nttp|file|http|ftp|https)://)|(www|ftp))[-A-Za-z0-9\\.]+(:[0-9]*)?", VTATTR_UNDERLINE, "host only url");
-	zvt_term_match_add( ZVT_TERM(term), "(((news|telnet|nttp|file|http|ftp|https)://)|(www|ftp))[-A-Za-z0-9\\.]+(:[0-9]*)?/[-A-Za-z0-9_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#]*[^]'\\.}>\\) ,\\\"]", VTATTR_UNDERLINE, "full url");
+	zvt_term_match_add( ZVT_TERM(term), "(((news|telnet|nttp|file|http|ftp|https)://)|(www\\.|ftp\\.))[-A-Za-z0-9\\.]+(:[0-9]*)?", VTATTR_UNDERLINE, "host only url");
+	zvt_term_match_add( ZVT_TERM(term), "(((news|telnet|nttp|file|http|ftp|https)://)|(www\\.|ftp\\.))[-A-Za-z0-9\\.]+(:[0-9]*)?/[-A-Za-z0-9_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#]*[^]'\\.}>\\) ,\\\"]", VTATTR_UNDERLINE, "full url");
+	zvt_term_match_add( ZVT_TERM(term), "[-A-Za-z0-9\\.]+(\\.com|\\.org|\\.net)?", VTATTR_UNDERLINE, "host only url");
+	zvt_term_match_add( ZVT_TERM(term), "[-A-Za-z0-9\\.]+(\\.com|\\.org|\\.net)/[-A-Za-z0-9_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#]*[^]'\\.}>\\) ,\\\"]", VTATTR_UNDERLINE, "full url");
 #endif
 
 	if (!cfg->menubar_hidden)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]