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

babel-generator: keep double quotes in StringLiteral for JSX parent #3189

Merged
merged 1 commit into from
Dec 21, 2015

Conversation

hzoo
Copy link
Member

@hzoo hzoo commented Dec 20, 2015

Fixes https://phabricator.babeljs.io/T6859

Idea is to check if the parent node of the StringLiteral is of type JSX - although maybe we can just check t.isJSXAttribute?

var quotes = '!';

React.createClass({
  render() {
+    return <View multiple="attributes" attribute="Value's got a single quote in it" />;
-    return <View multiple='attributes' attribute='Value\'s got a single quote in it' />;
  }
});

@steveluscher

@codecov-io
Copy link

Current coverage is 84.79%

Merging #3189 into master will decrease coverage by -0.31% as of 98cf473

@@            master   #3189   diff @@
======================================
  Files          215     215       
  Stmts        15605   15605       
  Branches      3334    3334       
  Methods          0       0       
======================================
- Hit          13281   13233    -48
- Partial        677     724    +47
- Missed        1647    1648     +1

Review entire Coverage Diff as of 98cf473

Powered by Codecov. Updated on successful CI builds.

amasad added a commit that referenced this pull request Dec 21, 2015
babel-generator: keep double quotes in StringLiteral for JSX parent
@amasad amasad merged commit c5f504b into babel:master Dec 21, 2015
@hzoo hzoo deleted the T6859 branch February 25, 2017 17:29
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants