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

Trailing space on nested JSX expressions #71

Open
ckknight opened this issue May 20, 2016 · 0 comments
Open

Trailing space on nested JSX expressions #71

ckknight opened this issue May 20, 2016 · 0 comments
Labels

Comments

@ckknight
Copy link
Contributor

Input:

import React, { Component } from 'react';
import { FormattedMessage } from 'react-intl';
import IconButton from './IconButton';

export default class NewSceneButton extends Component {
    render() {
        return (
            <IconButton
                href="/new-scene"
                icon="camera"
                caption={<FormattedMessage
                    id="home.create"
                    description="Link to the create section from the home screen"
                    defaultMessage="Create"
                />}
            />
        );
    }
}

Output:

import React, { Component } from 'react';
import { FormattedMessage } from 'react-intl';
import IconButton from './IconButton';

export default class NewSceneButton extends Component {
    render() {
        return (
            <IconButton
              href="/new-scene"
              icon="camera"
              caption={<FormattedMessage 
                         id="home.create" 
                         description="Link to the create section from the home screen" 
                         defaultMessage="Create" />} />
            );
    }
}

The internal FormattedMessage has a space at the end of the line before each newline.

@royriojas royriojas added the bug label Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants