Escape 0xFF still with "\x", not "\u"
This commit is contained in:
parent
d5caaa7877
commit
aa2327191f
|
@ -135,7 +135,7 @@ PEG.compiler.emitter = function(ast) {
|
||||||
" function escape(ch) {",
|
" function escape(ch) {",
|
||||||
" var charCode = ch.charCodeAt(0);",
|
" var charCode = ch.charCodeAt(0);",
|
||||||
" ",
|
" ",
|
||||||
" if (charCode < 0xFF) {",
|
" if (charCode <= 0xFF) {",
|
||||||
" var escapeChar = 'x';",
|
" var escapeChar = 'x';",
|
||||||
" var length = 2;",
|
" var length = 2;",
|
||||||
" } else {",
|
" } else {",
|
||||||
|
|
|
@ -29,7 +29,7 @@ PEG.parser = (function(){
|
||||||
function escape(ch) {
|
function escape(ch) {
|
||||||
var charCode = ch.charCodeAt(0);
|
var charCode = ch.charCodeAt(0);
|
||||||
|
|
||||||
if (charCode < 0xFF) {
|
if (charCode <= 0xFF) {
|
||||||
var escapeChar = 'x';
|
var escapeChar = 'x';
|
||||||
var length = 2;
|
var length = 2;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -61,7 +61,7 @@ function padLeft(input, padding, length) {
|
||||||
function escape(ch) {
|
function escape(ch) {
|
||||||
var charCode = ch.charCodeAt(0);
|
var charCode = ch.charCodeAt(0);
|
||||||
|
|
||||||
if (charCode < 0xFF) {
|
if (charCode <= 0xFF) {
|
||||||
var escapeChar = 'x';
|
var escapeChar = 'x';
|
||||||
var length = 2;
|
var length = 2;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue