-
Notifications
You must be signed in to change notification settings - Fork 222
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
Support for JSX #97
Comments
Not going to be able to support this. JsFormat uses the upstream einars/js-beautify project to perform the actual formatting, which doesn't (and I seriously doubt ever will) support jsx. Currently you can not use JsFormat in an arbitrary HTML file either for similar reasons, unless you first highlight the javascript you want to format. The same workaround might get you by, but I doubt it. |
See beautifier/js-beautify#385. As part of fixing that issue, it is likely that we'll ignore all non-javascript script tags, which would then also ignore the JSX scripts. While not "support", we at least then wouldn't break them. |
@bitwiseman good to know, thanks. However, currently we are specifically using js-beautify and only support formatting javascript within html files if the user highlights the javascript first. Right now I don't plan on adding support for mixed html/js formatting, and if I did decide to I would want to go with an all python solution (it looks like beautify-html only has a javascript version right now). |
Ah, right forgot about that. Thanks! |
Support formatting of javascript files with JSX templates, http://facebook.github.io/react/docs/getting-started.html
Right now it's messing up the html and adding spaces around the < > tags
The text was updated successfully, but these errors were encountered: