made style changes
parent
7e78154ef4
commit
4976597a70
|
@ -13,10 +13,14 @@ handle remainder => sub {
|
||||||
my $link = 'http://unicornify.appspot.com/';
|
my $link = 'http://unicornify.appspot.com/';
|
||||||
if (Email::Valid->address($_)) {
|
if (Email::Valid->address($_)) {
|
||||||
s/[\s\t]+//g; # strip whitespace from the remainder, we just need the email address.
|
s/[\s\t]+//g; # strip whitespace from the remainder, we just need the email address.
|
||||||
return $_ . '\'s unicorn:',
|
my $answer = 'This is a unique unicorn for ' . $_ . ':' . "\nLearn more at unicornify.appspot.com";
|
||||||
html => $_ . '\'s unicorn (<a href="'.$link.'">Learn more at unicornify.appspot.com</a>):'
|
my $header = $_ . '(Unicornify)';
|
||||||
|
my $html = 'This is a unique unicorn for ' . $_ . ':'
|
||||||
.'<br /><a href="' . unicornify_url(email => $_, size => 128) .'">'
|
.'<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;
|
return;
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,10 +13,12 @@ ddg_goodie_test(
|
||||||
[qw(
|
[qw(
|
||||||
DDG::Goodie::Unicornify
|
DDG::Goodie::Unicornify
|
||||||
)],
|
)],
|
||||||
'unicornify bob@bob.com' =>
|
'unicornify example@example.com' =>
|
||||||
test_zci('bob@bob.com\'s unicorn:',
|
test_zci('This is a unique unicorn for example@example.com:' . "\n" . 'Learn more at unicornify.appspot.com',
|
||||||
html => 'bob@bob.com\'s unicorn (<a href="http://unicornify.appspot.com/">Learn more at unicornify.appspot.com</a>):<br />'
|
header => 'example@example.com (Unicornify)',
|
||||||
.'<a href="'.unicornify_url(email => 'bob@bob.com', size => 128).'">'
|
html => 'This is a unique unicorn for example@example.com:'
|
||||||
.'<img src="'.unicornify_url(email=>'bob@bob.com', size => 100).'" style="margin: 10px 0px 10px 20px; border-radius: 8px;" /></a>'));
|
.'<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;
|
done_testing;
|
||||||
|
|
Loading…
Reference in New Issue