dillon1000/react

Commit

More tests for fbt whitespace handling

I experimented with more variations but prettier collapses most of them: any run 
of consecutive whitespace within a jsxtext node will get collapsed into a single 
space, for example. So the main difference in practice is whether a jsxtext node 
(preceding a value) has a trailing space/newline or not: 

``` 

Text <fbt:param /> Text 

// vs 

Text<fbt:param />Text 

``` 

which we now have tests for.
Browse files
Changed paths8 files
First-parent comparison
A compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/fbt/fbt-no-whitespace-btw-text-and-param.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/fbt/fbt-no-whitespace-btw-text-and-param.tsx AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/fbt/fbt-single-space-btw-param-and-text.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/fbt/fbt-single-space-btw-param-and-text.tsx AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/fbt/fbt-whitespace-around-param-value.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/fbt/fbt-whitespace-around-param-value.tsx AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/fbt/fbt-whitespace-within-text.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/fbt/fbt-whitespace-within-text.tsx Added
Patch

Files changed

Rendering syntax-highlighted changes…