Escape 0xFF still with "\x", not "\u"

This commit is contained in:
David Majda 2011-01-26 14:10:00 +01:00
parent d5caaa7877
commit aa2327191f
3 changed files with 3 additions and 3 deletions

View file

@ -135,7 +135,7 @@ PEG.compiler.emitter = function(ast) {
" function escape(ch) {",
" var charCode = ch.charCodeAt(0);",
" ",
" if (charCode < 0xFF) {",
" if (charCode <= 0xFF) {",
" var escapeChar = 'x';",
" var length = 2;",
" } else {",

View file

@ -29,7 +29,7 @@ PEG.parser = (function(){
function escape(ch) {
var charCode = ch.charCodeAt(0);
if (charCode < 0xFF) {
if (charCode <= 0xFF) {
var escapeChar = 'x';
var length = 2;
} else {

View file

@ -61,7 +61,7 @@ function padLeft(input, padding, length) {
function escape(ch) {
var charCode = ch.charCodeAt(0);
if (charCode < 0xFF) {
if (charCode <= 0xFF) {
var escapeChar = 'x';
var length = 2;
} else {