Skip to content

Commit

Permalink
Merge pull request SeleniumHQ#173 from jamadam/perl-formatter-improve
Browse files Browse the repository at this point in the history
Perl formatter improvement
  • Loading branch information
samitbadle committed Mar 15, 2015
2 parents 0cdc1b9 + 362777c commit c568c54
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ide/plugins/perl-format/src/content/formats/perl-rc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ var formatter = this;
string = function(value) {
if (value != null) {
value = value.replace(/\\/g, '\\\\');
value = value.replace(/\"/g, '\\"');
value = value.replace(/\'/g, '\\\'');
value = value.replace(/\r/g, '\\r');
value = value.replace(/\n/g, '\\n');
value = value.replace(/@/g, '\\@');
value = value.replace(/\$/g, '\\$');
return '"' + value + '"';
return "'" + value + "'";
} else {
return '""';
return "'";
}
}

Expand Down Expand Up @@ -229,6 +227,11 @@ this.options = {
header:
'use strict;\n' +
'use warnings;\n' +
'use utf8;\n' +
'BEGIN {\n' +
' binmode STDOUT, ":utf8";\n' +
' binmode STDERR, ":utf8";\n' +
'}\n' +
'use Time::HiRes qw(sleep);\n' +
'use Test::WWW::Selenium;\n' +
'use Test::More "no_plan";\n' +
Expand Down

0 comments on commit c568c54

Please sign in to comment.