Skip to content

Removing jsx class-level indention when transforming HTML into JSX #100

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

Merged
merged 1 commit into from
Jan 25, 2017

Conversation

svnv
Copy link
Contributor

@svnv svnv commented Jan 22, 2017

An example using the default example at http://magic.reactjs.net/htmltojsx.htm

If Create class is disabled the output is formatted like this:

<div>
        {/* Hello world */}
        <div className="awesome" style={{border: '1px solid red'}}>
          <label htmlFor="name">Enter your name: </label>
          <input type="text" id="name" />
        </div>
        <p>Enter your HTML here</p>
      </div>

With this pull request the output when Create class is disabled will instead be formatted like this :

<div>
  {/* Hello world */}
  <div className="awesome" style={{border: '1px solid red'}}>
    <label htmlFor="name">Enter your name: </label>
    <input type="text" id="name" />
  </div>
  <p>Enter your HTML here</p>
</div>

…en createClass is set to false in the converter config
@Daniel15
Copy link
Member

Thanks!

@Daniel15 Daniel15 merged commit 5c387c5 into reactjs:master Jan 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants