Skip to content

Commit

Permalink
Fix line ending processing by Build.
Browse files Browse the repository at this point in the history
  • Loading branch information
perlDreamer committed Feb 25, 2012
1 parent 8fad376 commit a418cbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/WGDev/Command/Build.pm
Expand Up @@ -129,9 +129,9 @@ sub write_db_structure {
if ( !$statement && $line =~ /\A(CREATE[ ]TABLE)/msx ) {
$statement = $1;
}
if ( $statement && $line =~ /;\z/msx ) {
if ( $statement && $line =~ /;\n?\z/msx ) {
if ( $statement eq 'CREATE TABLE' ) {
$line =~ s/;\z/ CHARSET=utf8;/msx;
$line =~ s/;(\n?)\z/ CHARSET=utf8;$1/msx;
}
undef $statement;
}
Expand Down

0 comments on commit a418cbd

Please sign in to comment.