Permalink
Browse files

Merge pull request #369 from mal/ascii-regex

Apply ascii only option to regular expressions
  • Loading branch information...
2 parents 9183ede + e635913 commit 521bb0f1ec10bd1b52fe993f3a264746d6202c4f @mishoo mishoo committed Apr 21, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/process.js
View
@@ -1754,6 +1754,7 @@ function gen_code(ast, options) {
return obj_needs_parens ? "(" + out + ")" : out;
},
"regexp": function(rx, mods) {
+ if (options.ascii_only) rx = to_ascii(rx);
return "/" + rx + "/" + mods;
},
"array": function(elements) {

0 comments on commit 521bb0f

Please sign in to comment.