parent
d1191adce6
commit
0e2bc09409
|
@ -2757,7 +2757,7 @@ function printJSXChildren(path, options, print, jsxWhitespace) {
|
|||
|
||||
if (/\S/.test(value)) {
|
||||
// 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);
|
||||
if (newlines) {
|
||||
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