1 |
commit: 38ac05111cba0a13ab89228b17094da936f7c5ef |
2 |
Author: Alex Legler <alex <AT> a3li <DOT> li> |
3 |
AuthorDate: Wed Feb 25 14:19:41 2015 +0000 |
4 |
Commit: Alex Legler <a3li <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 25 14:19:41 2015 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/ag-web.git;a=commit;h=38ac0511 |
7 |
|
8 |
Display TLD in escaped header fields |
9 |
|
10 |
--- |
11 |
lib/helpers.rb | 3 ++- |
12 |
1 file changed, 2 insertions(+), 1 deletion(-) |
13 |
|
14 |
diff --git a/lib/helpers.rb b/lib/helpers.rb |
15 |
index 987caeb..873d50f 100644 |
16 |
--- a/lib/helpers.rb |
17 |
+++ b/lib/helpers.rb |
18 |
@@ -51,7 +51,8 @@ helpers do |
19 |
elsif $1 == 'lists.gentoo.org' |
20 |
"@l.g.o#{$2}" |
21 |
else |
22 |
- "@#{'×' * $1.length}#{$2}" |
23 |
+ domain, dot, tld = $1.rpartition '.' |
24 |
+ "@#{'×' * domain.length}.#{tld}#{$2}" |
25 |
end |
26 |
end |
27 |
end |