made style changes

master
Jessica Yu 2012-09-09 23:56:39 -07:00
parent 7e78154ef4
commit 4976597a70
2 changed files with 14 additions and 8 deletions

View File

@ -13,10 +13,14 @@ handle remainder => sub {
my $link = 'http://unicornify.appspot.com/';
if (Email::Valid->address($_)) {
s/[\s\t]+//g; # strip whitespace from the remainder, we just need the email address.
return $_ . '\'s unicorn:',
html => $_ . '\'s unicorn (<a href="'.$link.'">Learn more at unicornify.appspot.com</a>):'
my $answer = 'This is a unique unicorn for ' . $_ . ':' . "\nLearn more at unicornify.appspot.com";
my $header = $_ . '(Unicornify)';
my $html = 'This is a unique unicorn for ' . $_ . ':'
.'<br /><a href="' . unicornify_url(email => $_, size => 128) .'">'
.'<img src="'.unicornify_url(email => $_, size => "100").'" style="margin: 10px 0px 10px 20px; border-radius: 8px;" /></a>';
.'<img src="'.unicornify_url(email => $_, size => "100").'" style="margin: 10px 0px 10px 20px; border-radius: 8px;" /></a>'
. '<br /><a href="'.$link.'">Learn more at unicornify.appspot.com</a>';
return $answer, header => $header, html => $html;
}
return;
};

View File

@ -13,10 +13,12 @@ ddg_goodie_test(
[qw(
DDG::Goodie::Unicornify
)],
'unicornify bob@bob.com' =>
test_zci('bob@bob.com\'s unicorn:',
html => 'bob@bob.com\'s unicorn (<a href="http://unicornify.appspot.com/">Learn more at unicornify.appspot.com</a>):<br />'
.'<a href="'.unicornify_url(email => 'bob@bob.com', size => 128).'">'
.'<img src="'.unicornify_url(email=>'bob@bob.com', size => 100).'" style="margin: 10px 0px 10px 20px; border-radius: 8px;" /></a>'));
'unicornify example@example.com' =>
test_zci('This is a unique unicorn for example@example.com:' . "\n" . 'Learn more at unicornify.appspot.com',
header => 'example@example.com (Unicornify)',
html => 'This is a unique unicorn for example@example.com:'
.'<br /><a href="'.unicornify_url(email => 'example@example.com', size => 128).'">'
.'<img src="'.unicornify_url(email=>'example@example.com', size => 100).'" style="margin: 10px 0px 10px 20px; border-radius: 8px;" /></a>'
. '<br /><a href="http://unicornify.appspot.com/">Learn more at unicornify.appspot.com</a>'));
done_testing;