commit:     38ac05111cba0a13ab89228b17094da936f7c5ef
Author:     Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Wed Feb 25 14:19:41 2015 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Wed Feb 25 14:19:41 2015 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/ag-web.git;a=commit;h=38ac0511

Display TLD in escaped header fields

---
 lib/helpers.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/helpers.rb b/lib/helpers.rb
index 987caeb..873d50f 100644
--- a/lib/helpers.rb
+++ b/lib/helpers.rb
@@ -51,7 +51,8 @@ helpers do
         elsif $1 == 'lists.gentoo.org'
           "@l.g.o#{$2}"
         else
-          "@#{'×' * $1.length}#{$2}"
+          domain, dot, tld = $1.rpartition '.'
+          "@#{'×' * domain.length}.#{tld}#{$2}"
         end
       end
     end

Reply via email to