* Enlightenment SVN <no-re...@enlightenment.org> [2012-10-09 07:50:02 -0700]:

Hero commit.

> Log:
> 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
>   
>   
> 
> Author:       barbieri
> Date:         2012-10-09 07:50:01 -0700 (Tue, 09 Oct 2012)
> New Revision: 77647
> Trac:         http://trac.enlightenment.org/e/changeset/77647
> 
> Modified:
>   trunk/terminology/src/bin/termio.c trunk/terminology/src/bin/termiolink.c 
> 
> Modified: trunk/terminology/src/bin/termio.c
> ===================================================================
> --- trunk/terminology/src/bin/termio.c        2012-10-09 14:28:47 UTC (rev 
> 77646)
> +++ trunk/terminology/src/bin/termio.c        2012-10-09 14:50:01 UTC (rev 
> 77647)
> @@ -119,9 +119,13 @@
>          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)
> 
> Modified: trunk/terminology/src/bin/termiolink.c
> ===================================================================
> --- trunk/terminology/src/bin/termiolink.c    2012-10-09 14:28:47 UTC (rev 
> 77646)
> +++ trunk/terminology/src/bin/termiolink.c    2012-10-09 14:50:01 UTC (rev 
> 77647)
> @@ -160,7 +160,9 @@
>            }
>          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)) ||
> 
> 
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn

-- 
Gustavo Lima Chaves
Computer Engineer @ ProFUSION Embedded Systems

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to