dillon1000/react
Commit
Browse files [repro] Repro for fbt preserve whitespace bug
Current sprout output (if you remove the line in `SproutTodoFilter`):
```
Failures:
FAIL: bug-fbt-preserve-whitespace
Difference in forget and non-forget results.
Expected result: {
"kind": "ok",
"value": "Before text hello world",
"logs": []
}
Found: {
"kind": "ok",
"value": "Before texthello world",
"logs": []
}
```
`fbt` transforms run before jsx ones, so our lowering should also account for
[fbt's whitespace
rules](https://github.com/facebook/fbt/blob/main/packages/babel-plugin-fbt/src/fbt-nodes/FbtImplicitParamNode.js#L230-L233)
in `BuildHIR:trimJsxText`.Changed paths5 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/bug-fbt-preserve-whitespace.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/bug-fbt-preserve-whitespace.tsx AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/jsx-preserve-whitespace.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/jsx-preserve-whitespace.tsx AddedM compiler/packages/sprout/src/SproutTodoFilter.ts ModifiedPatch
Files changed
Rendering syntax-highlighted changes…