Flip and mirror both mirror now
There aren't hex codes for characters that aren't mirrored, i.e. just flipped upside-down, so the "flip" trigger wasn't really working.master
parent
70b4c69cd3
commit
0722a20ccc
|
@ -87,19 +87,9 @@ my %charMap = (
|
|||
"<" => ">",
|
||||
"_" => "\x{203E}");
|
||||
|
||||
handle sub {
|
||||
handle remainder => sub {
|
||||
|
||||
$_ =~ s/^(\s*flip\s*)//;
|
||||
$_ =~ s/(\s*flip\s*)$//;
|
||||
|
||||
if ($_ =~ /^(\s*mirror\s*)/ || $_ =~ /(\s*mirror\s*)/) {
|
||||
$_ =~ s/^(\s*mirror\s*)//;
|
||||
$_ =~ s/(\s*mirror\s*)$//;
|
||||
|
||||
$_ = reverse $_;
|
||||
}
|
||||
|
||||
my @string = split(//, $_);
|
||||
my @string = split(//, reverse $_);
|
||||
my $flippedString;
|
||||
|
||||
for (@string) {
|
||||
|
|
|
@ -13,7 +13,7 @@ ddg_goodie_test(
|
|||
DDG::Goodie::FlipText
|
||||
)],
|
||||
'flip test' => test_zci("\x{0287}\x{01DD}\x{0073}\x{0287}"),
|
||||
'mirror test' => test_zci("\x{0287}\x{0073}\x{01DD}\x{0287}"),
|
||||
'mirror test' => test_zci("\x{0287}\x{01DD}\x{0073}\x{0287}"),
|
||||
);
|
||||
|
||||
done_testing;
|
||||
|
|
Loading…
Reference in New Issue