Skip to content
Browse files

Fix spelling correction panda hax

  • Loading branch information...
1 parent 1f55e18 commit 3b5853cd9fb1a36e0e29bf3aa6c345354ad9afee @holdenk committed Dec 24, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 Unicorn/Wordlist.pm
View
7 Unicorn/Wordlist.pm
@@ -543,12 +543,17 @@ my %bypablo = ( "syncronous" => "synchronous",
sub fix_text {
my $file = shift @_;
my $text = shift @_;
+ my $oldtext = $text;
foreach my $k (keys %common) {
if ($text =~ s/\b($k)\b/preserve_case($1,$common{$k})/egi) {
1;
}
}
- return $text;
+ if ($oldtext != $text) {
+ open (my $output, ">$file");
+ print $output $text;
+ close($output);
+ }
}
sub preserve_case {

0 comments on commit 3b5853c

Please sign in to comment.
Something went wrong with that request. Please try again.