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

React Fragment Short Syntax <></> issue #1854

Closed
laggingreflex opened this issue Nov 2, 2020 · 2 comments
Closed

React Fragment Short Syntax <></> issue #1854

laggingreflex opened this issue Nov 2, 2020 · 2 comments

Comments

@laggingreflex
Copy link

laggingreflex commented Nov 2, 2020

Description

React Fragment Short Syntax gets messed up.

The beautified code results in compile errors.

Input

class Columns extends React.Component {
  render() {
    return (
      <>        
        <td>Hello</td>
        <td>World</td>
      </>    
    );
  }
}

Expected Output

Shouldn't change:

class Columns extends React.Component {
  render() {
    return (
      <>        
        <td>Hello</td>
        <td>World</td>
      </>    
    );
  }
}

Actual Output

The code actually looked like this after beautification:

class Columns extends React.Component {
    render() {
        return (
            <>        
        <td>Hello</td> <
            td > World < /td> <
            />    
        );
    }
}

Steps to Reproduce

Copy paste the the sample code from docs on https://beautifier.io/

Environment

Tried on https://beautifier.io/

Settings

Default on https://beautifier.io/ (with jsx)

@bitwiseman bitwiseman added this to the 1.13.x milestone Nov 12, 2020
@bitwiseman
Copy link
Member

@JuanFML
Copy link
Contributor

JuanFML commented Dec 23, 2020

Hello! I was looking into this issue, could I work on it?

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