fix string unescaping
This commit is contained in:
parent
8bfc409ff0
commit
53aaf2e606
|
|
@ -223,7 +223,7 @@ function processFile(file) {
|
||||||
var inferred_names = {};
|
var inferred_names = {};
|
||||||
for (var i = 0; i < result.length; i++) {
|
for (var i = 0; i < result.length; i++) {
|
||||||
if (result[i].hasOwnProperty("inf")) {
|
if (result[i].hasOwnProperty("inf")) {
|
||||||
inferred_names[result[i].v] = result[i].inf.green;
|
inferred_names[result[i].v] = UglifyJS.unescapeString(result[i].inf).green;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -596,6 +596,10 @@ function escapeString(input){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function unescapeString(input){
|
||||||
|
return decodeURIComponent(input);
|
||||||
|
}
|
||||||
|
|
||||||
function parseFile(code, file) {
|
function parseFile(code, file) {
|
||||||
var toplevel = parse(code, {
|
var toplevel = parse(code, {
|
||||||
filename : file
|
filename : file
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"description": "JavaScript tool that renames variables and parameters to names based on statistical model learnt from thousands of open source projects",
|
"description": "JavaScript tool that renames variables and parameters to names based on statistical model learnt from thousands of open source projects",
|
||||||
"homepage": "https://github.com/eth-srl/UnuglifyJS",
|
"homepage": "https://github.com/eth-srl/UnuglifyJS",
|
||||||
"main": "tools/node.js",
|
"main": "tools/node.js",
|
||||||
"version": "0.9.3",
|
"version": "0.9.4",
|
||||||
"engines": { "node" : ">=0.4.0" },
|
"engines": { "node" : ">=0.4.0" },
|
||||||
"maintainers": [{
|
"maintainers": [{
|
||||||
"name": "Pavol Bielik",
|
"name": "Pavol Bielik",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user