-
Notifications
You must be signed in to change notification settings - Fork 179
BUG: fbt is not preserving
#240
Comments
BTW, I tried |
Hi @mrtnzlml, That's strange because we're specifically supporting this kind of use-case. Test case: fbt/packages/babel-plugin-fbt/src/__tests__/fbtJsx-test.js Lines 303 to 307 in 76debd6
Snapshot: fbt/packages/babel-plugin-fbt/src/__tests__/__snapshots__/fbtJsx-test.js.snap Lines 543 to 553 in 6d2de3c
AFAIK, it's the Babel parser that reads and decodes HTML entities within JSX. It'd really help if you could make a repro repository to help us debug this further if necessary. :-) |
Hi @kayhadrin, thanks for having a look! I've created a demo here: https://github.com/mrtnzlml/bug-fbt-nbsp It is certainly possible that it's something wrong with my setup. However, everything else seems to be working as expected (check the demo with other entities) and I am not sure how should this be fixed in my code. 🤔
I've clicked on "Edit as HTML" when inspecting the element because otherwise I noticed this issue originally on my other website where "80 ℃" was having an unexpected line-break but it worked as expected when I removed the |
Thanks for this! I've prepared a patch for this. |
…ok#318) Summary: ` ` characters in the <fbt> callsites are being incorrectly replaced by plain spaces. Fixes facebook#240 Pull Request resolved: facebook#318 Reviewed By: pkqinys Differential Revision: D33402749 fbshipit-source-id: 99dd9ed1085ccb1dfce2506b4b6aaad599246a90
🐛 Bug Report
Non-breaking space
is being replaced by FBT with simple space. That's unexpected in situations where you really need a non-breaking space.To Reproduce
Steps to reproduce the behavior:
As you can see, the second
disappeared which is not correct.Expected behavior
should be preserved in the outputenvinfo
The text was updated successfully, but these errors were encountered: