Skip to content

Commit

Permalink
reduced escapes in Perl code
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadam committed Feb 26, 2014
1 parent 0785d10 commit d7dbc30
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 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

0 comments on commit d7dbc30

Please sign in to comment.