aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-05-31 01:56:52 +0800
committerGitHub <noreply@github.com>2017-05-31 01:56:52 +0800
commit55b5f2a8aa90a69e523c0a53ca92fcef45e5b209 (patch)
tree2889651dc1d2c75be3db6f8d9d918fb81527967e /bin
parent4e0a22e5c88ac841a3bb67081454f2a83dbfe1a7 (diff)
downloadtracifyjs-55b5f2a8aa90a69e523c0a53ca92fcef45e5b209.tar.gz
tracifyjs-55b5f2a8aa90a69e523c0a53ca92fcef45e5b209.zip
widen CLI parse error code fragment displayed (#2032)
fixes #2030
Diffstat (limited to 'bin')
-rwxr-xr-xbin/uglifyjs7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/uglifyjs b/bin/uglifyjs
index a2039f7e..ef2020c5 100755
--- a/bin/uglifyjs
+++ b/bin/uglifyjs
@@ -225,9 +225,10 @@ function run() {
col = line.length;
}
if (line) {
- if (col > 40) {
- line = line.slice(col - 40);
- col = 40;
+ var limit = 78;
+ if (col > limit) {
+ line = line.slice(col - limit);
+ col = limit;
}
console.error(line.slice(0, 80));
console.error(line.slice(0, col).replace(/\S/g, " ") + "^");