瀏覽代碼

Trim pretty output

master
Dylan Baker 5 年之前
父節點
當前提交
b03a12ab47
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      src/compiler.ts

+ 2
- 1
src/compiler.ts 查看文件

31
     const resultError = result.find((el) => el instanceof EnvError);
31
     const resultError = result.find((el) => el instanceof EnvError);
32
     if (resultError !== undefined) return resultError;
32
     if (resultError !== undefined) return resultError;
33
 
33
 
34
-    return result.join(this.prettyPrint ? '\n' : '');
34
+    const output = result.join(this.prettyPrint ? '\n' : '');
35
+    return this.prettyPrint ? output.trim() : output;
35
   }
36
   }
36
 }
37
 }

Loading…
取消
儲存