just highlight emails with domains containing a period.
While a domain "localhost" is valid, it's very annoying as most PS1 prompts are in the form 'user@hostname' and terminology will highlight them. To avoid so just create links for user@hostname.something SVN revision: 77647
This commit is contained in:
parent
52af5639d7
commit
5bfed09e13
|
@ -119,9 +119,13 @@ _activate_link(Evas_Object *obj)
|
|||
path = sd->link.string;
|
||||
if (!strncasecmp(sd->link.string, "file://", 7)) path = path + 7;
|
||||
}
|
||||
else if (strchr(sd->link.string, '@'))
|
||||
email = EINA_TRUE;
|
||||
|
||||
else
|
||||
{
|
||||
const char *at = strchr(sd->link.string, '@');
|
||||
if (at && (strchr(at + 1, '.')))
|
||||
email = EINA_TRUE;
|
||||
}
|
||||
|
||||
s = eina_str_escape(sd->link.string);
|
||||
if (!s) return;
|
||||
if (email)
|
||||
|
|
|
@ -160,7 +160,9 @@ _termio_link_find(Evas_Object *obj, int cx, int cy, int *x1r, int *y1r, int *x2r
|
|||
}
|
||||
if ((!isspace(s[0])) && (len > 1))
|
||||
{
|
||||
if ((strchr(s, '@')) ||
|
||||
const char *at = strchr(s, '@');
|
||||
|
||||
if ((at && (strchr(at + 1, '.'))) ||
|
||||
(!strncasecmp(s, "http://", 7))||
|
||||
(!strncasecmp(s, "https://", 8)) ||
|
||||
(!strncasecmp(s, "ftp://", 6)) ||
|
||||
|
|
Loading…
Reference in New Issue