parent
d1191adce6
commit
0e2bc09409
|
@ -2757,7 +2757,7 @@ function printJSXChildren(path, options, print, jsxWhitespace) {
|
||||||
|
|
||||||
if (/\S/.test(value)) {
|
if (/\S/.test(value)) {
|
||||||
// treat each line of text as its own entity
|
// treat each line of text as its own entity
|
||||||
value.split(/(\n\s*)/).forEach(line => {
|
value.split(/(\r?\n\s*)/).forEach(line => {
|
||||||
const newlines = line.match(/\n/g);
|
const newlines = line.match(/\n/g);
|
||||||
if (newlines) {
|
if (newlines) {
|
||||||
children.push(hardline);
|
children.push(hardline);
|
||||||
|
|
|
@ -187,3 +187,14 @@ regression_extra_newline_2 = (
|
||||||
);
|
);
|
||||||
"
|
"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`windows.js 1`] = `
|
||||||
|
"<div>
|
||||||
|
Text
|
||||||
|
</div>
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
<div>
|
||||||
|
Text
|
||||||
|
</div>;
|
||||||
|
"
|
||||||
|
`;
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<div>
|
||||||
|
Text
|
||||||
|
</div>
|
Loading…
Reference in New Issue