Skip to content

De-duplicate indentations in JSX Texts #36552

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 6 commits into from
Feb 3, 2020
Merged

Conversation

orta
Copy link
Contributor

@orta orta commented Jan 31, 2020

Fixes #20766 - Some of the interesting notes are in orta#1

weswigham and others added 2 commits January 31, 2020 18:43
Offload all jsx text indentation handling to indentMultilineCommentOrJsxText
@orta orta marked this pull request as ready for review February 2, 2020 12:38
@orta orta changed the title Refine the token size of JSX Texts to fix formatting issues De-duplicate indentations in JSX Texts Feb 2, 2020
Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@orta orta merged commit 7726464 into microsoft:master Feb 3, 2020
@orta
Copy link
Contributor Author

orta commented Feb 3, 2020

@typescript-bot cherry-pick this to branchname release-3.8

@typescript-bot
Copy link
Collaborator

Heya @orta, I couldn't find the branch 'branchname' on Microsoft/TypeScript. You may need to make it and try again.

@orta
Copy link
Contributor Author

orta commented Feb 3, 2020

@typescript-bot cherry-pick this to release-3.8

1 similar comment
@weswigham
Copy link
Member

@typescript-bot cherry-pick this to release-3.8

@DanielRosenwasser
Copy link
Member

@typescript-bot cherry-pick this to release-3.8 and LKG

DanielRosenwasser pushed a commit that referenced this pull request Feb 5, 2020
* WIP on making the JSX text node not include whitespace

* Scans to the last newline for JSX correctly

* Handle JSX closing element wrapping

* Offload all jsx text indentation handling to indentMultilineCommentOrJsxText

* Switch from find node -> find inde in formatting

Co-authored-by: Wesley Wigham <[email protected]>
@orta
Copy link
Contributor Author

orta commented Feb 6, 2020

Thanks, was just coming to do that

@DanielRosenwasser
Copy link
Member

Woah, hold up, this thing doesn't make PRs anymore @weswigham?

@weswigham
Copy link
Member

Uhhh, that's news to me, especially since I had it open a PR (#36644) just the other day after it was updated.

@weswigham
Copy link
Member

I think I'm being lied to and that @orta manually cherry-picked it, since the cherry-pick script in this branch is out of date :P (y'know, since the last build for this branch is a failure)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSX formatting does not de-indent closing tag with text body
5 participants