Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve Non-breaking Spaces #16

Open
dvmorris opened this issue Jun 26, 2016 · 4 comments
Open

Preserve Non-breaking Spaces #16

dvmorris opened this issue Jun 26, 2016 · 4 comments
Assignees

Comments

@dvmorris
Copy link

Reacterminator does not seem to be honoring nbsp; characters. Example:

Input

<div class="signintext" id="SignInText">Already have an account?&nbsp;<a id="SignInLink" href="login.html">Sign in</a>

Output

<div id="SignInText" className="signintext">
  Already have an account?
  <Link id="SignInLink" href="login.html" params={{  path: 'login'}}> Sign in
  </Link>
</div>
@Chun-Yang
Copy link
Contributor

Fixed in version 0.10.4

@dvmorris
Copy link
Author

This fix did not work for me. I am still seeing the same issue, and I'm running the following versions:

├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected] (git://github.com/rike422/commander.js.git#81577a6544b52fb22fee60f5e2c660c6565c04bf)
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]

@martinbee
Copy link
Contributor

martinbee commented Aug 9, 2016

@Chun-Yang I'm looking into this issue and it appears that babylon's parse, using the jsx plugin, strips out   and replaces it with a ' '. If you get some time we can discuss this tomorrow and see if there's anything we want to do or can do. Attached below is a link to the map that babylon uses to replace html attributes and a screen shot of console output.

https://github.com/babel/babylon/blob/master/src/plugins/jsx/xhtml.js

screen shot 2016-08-08 at 8 39 21 pm

@Chun-Yang
Copy link
Contributor

@martinbee Thank you for looking into this. It would be ideal if we can pass in some options into babylon so that it preserve this keyword. Let's see what we can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants