Fix misprinting of directives.

Closes #29.
This commit is contained in:
Benjamin Tan committed 2017-01-11 22:47:22 +08:00
1 parent b37e8c4b36
commit 030a70fd38
3 files changed
+20 -1

No files matched your search

+1 -1
View File
@@ -522,7 +522,7 @@ function genericPrintNoParens(path, options, print) {
parts.push(
indent(
options.tabWidth,
concat([ line, print(childPath), ";", line ])
concat([ hardline, print(childPath), ";", hardline ])
)
);
},
@@ -1,3 +1,17 @@
exports[`test directives.js 1`] = `
"\"use strict\";
function fn() {
\"use strict\";
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\"use strict\";
function fn() {
\"use strict\";
}"
`;
exports[`test optional-type-name.js 1`] = `
"type Foo = (any) => string
+5
View File
@@ -0,0 +1,5 @@
"use strict";
function fn() {
"use strict";
}