TypeScript/tests/cases/fourslash/formattingJsxTexts2.ts
Armando Aguirre 36f7623225
Fix jsx formatting (#42671)
* Refactored scanJsxToken when is formatting

* Added bug regression test

* Simplify JsxText formatting

* Renamed isFormatting to allowMultilineJsxText

* Updated baselines
2021-03-13 01:00:42 -08:00

79 lines
No EOL
1 KiB
TypeScript

/// <reference path='fourslash.ts' />
//@Filename: file.tsx
//// const a = (
//// <div>
//// foo
//// </div>
//// );
////
//// const b = (
//// <div>
//// { foo }
//// </div>
//// );
////
//// const c = (
//// <div>
//// foo
//// { foobar }
//// bar
//// </div>
//// );
////
//// const d =
//// <div>
//// foo
//// </div>;
////
//// const e =
//// <div>
//// { foo }
//// </div>
////
//// const f =
//// <div>
//// foo
//// { foobar }
//// bar
//// </div>
format.document();
verify.currentFileContentIs(
`const a = (
<div>
foo
</div>
);
const b = (
<div>
{foo}
</div>
);
const c = (
<div>
foo
{foobar}
bar
</div>
);
const d =
<div>
foo
</div>;
const e =
<div>
{foo}
</div>
const f =
<div>
foo
{foobar}
bar
</div>`);