Skip to content

De-duplicate indentations in JSX Texts - #36552

Merged
Orta Therox (orta) merged 6 commits into
microsoft:masterfrom
orta:fix_20766
Feb 3, 2020
Merged

De-duplicate indentations in JSX Texts#36552
Orta Therox (orta) merged 6 commits into
microsoft:masterfrom
orta:fix_20766

Conversation

@orta

@ortaOrta Therox (orta) commented Jan 31, 2020

Copy link
Copy Markdown
Contributor

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

@orta
Orta Therox (orta) marked this pull request as ready for review February 2, 2020 12:38
@ortaOrta Therox (orta) changed the title Refine the token size of JSX Texts to fix formatting issuesDe-duplicate indentations in JSX TextsFeb 2, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

Comment threadsrc/services/formatting/formatting.ts Outdated
@orta
Orta Therox (orta) merged commit 7726464 into microsoft:masterFeb 3, 2020
@orta

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) cherry-pick this to branchname release-3.8

@typescript-bot

Copy link
Copy Markdown
Contributor

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

@orta

Copy link
Copy Markdown
ContributorAuthor

TypeScript Bot (@typescript-bot) cherry-pick this to release-3.8

1 similar comment
@weswigham

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) cherry-pick this to release-3.8

@DanielRosenwasser

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) cherry-pick this to release-3.8 and LKG

Daniel Rosenwasser (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 <wwigham@gmail.com>
@orta

Copy link
Copy Markdown
ContributorAuthor

Thanks, was just coming to do that

@DanielRosenwasser

Copy link
Copy Markdown
Member

Woah, hold up, this thing doesn't make PRs anymore Wesley Wigham (@weswigham)?

@weswigham

Copy link
Copy Markdown
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
Copy Markdown
Member

I think I'm being lied to and that Orta Therox (@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)

@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

@orta@typescript-bot@weswigham@DanielRosenwasser@andrewbranch