chinedufn / percy

Build frontend browser apps with Rust + WebAssembly. Supports server side rendering.
https://chinedufn.github.io/percy/
Apache License 2.0
2.26k stars 84 forks source link

Spaces removed when isomorphic app is hydrated #182

Closed kierandrewett closed 2 years ago

kierandrewett commented 2 years ago

When running the isomorphic example, any spaces in text are removed (as shown below)

Hydrated image

SSR copy (no JS) image

Definitely want to use Percy for my website as your library seems to be the only Rust frontend library that provides a good SSR example rather than SSR being an afterthought.

Any ideas on how this can be fixed?

chinedufn commented 2 years ago

Hey sorry for the delay!

Was your client compiled on stable?

https://github.com/chinedufn/percy/blob/2aed65476bc4d4660c0eb2fe6c733ce96bf6aee7/README.md#stable-rust

kierandrewett commented 2 years ago

I am on stable. Just switched to nightly + works just fine, thank you so much!

chinedufn commented 2 years ago

Great! If you'd like to stay on stable you can just wrap your text in quotes!

There's a plan to make this a compile time error instead of having people run into this and get confused. Sorry about that!


Related to https://github.com/chinedufn/percy/issues/170#issuecomment-1069115566