Browse Source

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

redux
David Majda 11 years ago
parent
commit
aa2327191f
  1. 2
      src/emitter.js
  2. 2
      src/parser.js
  3. 2
      src/utils.js

2
src/emitter.js

@ -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 {",

2
src/parser.js

@ -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 {

2
src/utils.js

@ -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 {

Loading…
Cancel
Save