Skip to content

Add JSXText node definition#80

Merged
sebmarkbage merged 1 commit intofacebook:masterfrom
soda0289:patch-1
May 12, 2017
Merged

Add JSXText node definition#80
sebmarkbage merged 1 commit intofacebook:masterfrom
soda0289:patch-1

Conversation

@soda0289
Copy link
Copy Markdown
Contributor

The recent change #78 allowed JSXText nodes to be used as a child in JSXElement but did not define the JSXText node. This commits adds a definition for JXText.

We might want to define exactly what is the difference between the property raw and value or leave it up to parsers to decided. I believe currently esprima and flow convert CRLF line ending for the value property but leave the text as is in the raw property.

@soda0289
Copy link
Copy Markdown
Contributor Author

soda0289 commented May 12, 2017

@vjeux @sebmarkbage I used the node type that is used in Flow and ESprima parsers. Babylon does not use the raw property but has the value property.

@sebmarkbage sebmarkbage merged commit f152dc0 into facebook:master May 12, 2017
@sebmarkbage
Copy link
Copy Markdown
Contributor

Babylon now has the raw behind the extra property. babel/babylon#344

hzoo pushed a commit to babel/babel that referenced this pull request Mar 15, 2018
aminmarashi pushed a commit to aminmarashi/babel that referenced this pull request Mar 17, 2018
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