prettier 1.14.1 → 1.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/standalone.js CHANGED
@@ -5,7 +5,7 @@
5
5
  }(this, (function () { 'use strict';
6
6
 
7
7
  var name = "prettier";
8
- var version$1 = "1.14.1";
8
+ var version$1 = "1.14.2";
9
9
  var description = "Prettier is an opinionated code formatter";
10
10
  var bin = {
11
11
  "prettier": "./bin/prettier.js"
@@ -85,11 +85,12 @@ var devDependencies = {
85
85
  "eslint-plugin-prettier": "2.6.0",
86
86
  "eslint-plugin-react": "7.7.0",
87
87
  "execa": "0.10.0",
88
+ "has-ansi": "3.0.0",
88
89
  "jest": "23.3.0",
89
90
  "jest-junit": "5.0.0",
90
91
  "jest-watch-typeahead": "0.1.0",
91
92
  "mkdirp": "0.5.1",
92
- "prettier": "1.14.0",
93
+ "prettier": "1.14.1",
93
94
  "prettylint": "1.0.0",
94
95
  "rimraf": "2.6.2",
95
96
  "rollup": "0.47.6",
@@ -10698,6 +10699,7 @@ function coreFormat(text, opts, addAlignmentSize) {
10698
10699
  addAlignmentSize = addAlignmentSize || 0;
10699
10700
  var parsed = parser.parse(text, opts);
10700
10701
  var ast = parsed.ast;
10702
+ var originalText = text;
10701
10703
  text = parsed.text;
10702
10704
 
10703
10705
  if (opts.cursorOffset >= 0) {
@@ -10710,7 +10712,7 @@ function coreFormat(text, opts, addAlignmentSize) {
10710
10712
 
10711
10713
  var astComments = attachComments(text, ast, opts);
10712
10714
  var doc$$1 = astToDoc(ast, opts, addAlignmentSize);
10713
- opts.newLine = guessLineEnding(text);
10715
+ opts.newLine = guessLineEnding(originalText);
10714
10716
 
10715
10717
  var result = _printDocToString(doc$$1, opts);
10716
10718