-
Notifications
You must be signed in to change notification settings - Fork 12.8k
add baseline for linked editing #54315
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
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
tests/baselines/reference/linkedEditingJsxTag10.linkedEditing.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
=== /jsx0.tsx === | ||
const jsx = <> | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx1.tsx === | ||
const jsx = </> | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx2.tsx === | ||
const jsx = <div> | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx3.tsx === | ||
const jsx = </div> | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx4.tsx === | ||
const jsx = <div> </>; | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx5.tsx === | ||
const jsx = <> </div>; | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx6.tsx === | ||
const jsx = div> </div>; | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx7.tsx === | ||
const jsx = <div> /div>; | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx8.tsx === | ||
const jsx = <div </div>; | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx9.tsx === | ||
const jsx = <[|/*0*/div|]> </[|/*0*/div|]; | ||
|
||
=== 0 === | ||
{"ranges":[{"start":13,"length":3},{"start":20,"length":3}],"wordPattern":"[a-zA-Z0-9:\\-\\._$]*"} | ||
|
||
|
||
=== /jsx10.tsx === | ||
const jsx = <> </; | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx11.tsx === | ||
const jsx = < </>; | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx12.tsx === | ||
const jsx = > </>; | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx13.tsx === | ||
const jsx = <> />; | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx14.tsx === | ||
const jsx = <> <div> </> </div>; | ||
|
||
--No linked edits found-- | ||
|
||
|
||
=== /jsx15.tsx === | ||
const jsx = <div> <> </div> </>; | ||
|
||
--No linked edits found-- | ||
|
||
|
27 changes: 27 additions & 0 deletions
27
tests/baselines/reference/linkedEditingJsxTag11.linkedEditing.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
=== /customElements.tsx === | ||
const jsx = <[|/*0*/fbt:enum|] knownProp="accepted" | ||
unknownProp="rejected"> | ||
</[|/*0*/fbt:enum|]>; | ||
|
||
const customElement = <[|/*1*/custom-element|]></[|/*1*/custom-element|]>; | ||
|
||
const standardElement = | ||
<[|/*2*/Link|] href="/hello" passHref> | ||
<[|/*3*/Button|] component="a"> | ||
Next | ||
</[|/*3*/Button|]> | ||
</[|/*2*/Link|]>; | ||
|
||
=== 0 === | ||
{"ranges":[{"start":13,"length":8},{"start":73,"length":8}],"wordPattern":"[a-zA-Z0-9:\\-\\._$]*"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can skip mentioning ranges here since they are already marked in the text above. |
||
|
||
=== 1 === | ||
{"ranges":[{"start":108,"length":14},{"start":125,"length":14}],"wordPattern":"[a-zA-Z0-9:\\-\\._$]*"} | ||
|
||
=== 2 === | ||
{"ranges":[{"start":172,"length":4},{"start":269,"length":4}],"wordPattern":"[a-zA-Z0-9:\\-\\._$]*"} | ||
|
||
=== 3 === | ||
{"ranges":[{"start":209,"length":6},{"start":256,"length":6}],"wordPattern":"[a-zA-Z0-9:\\-\\._$]*"} | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,19 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
// for readability | ||
////const jsx = ( | ||
//// <div style={{ color: 'red' }}> | ||
//// <p> | ||
//// <img /> | ||
//// </p> | ||
//// </div> | ||
////); | ||
|
||
// @Filename: /customElements.tsx | ||
//// const jsx = </*1*/fbt/*2*/:en/*3*/um knownProp="accepted" | ||
//// const jsx = <fbt:enum knownProp="accepted" | ||
//// unknownProp="rejected"> | ||
//// </f/*4*/bt:e/*5*/num>; | ||
//// </fbt:enum>; | ||
//// | ||
//// const customElement = </*6*/custom/*7*/-element/*8*/></custom/*9*/-element>; | ||
//// const customElement = <custom-element></custom-element>; | ||
//// | ||
//// const standardElement = | ||
//// </*10*/Link/*11*/ href="/hello" passHref> | ||
//// </*12*/But/*13*/ton component="a"> | ||
//// <Link href="/hello" passHref> | ||
//// <Button component="a"> | ||
//// Next | ||
//// </But/*14*/ton> | ||
//// </Li/*15*/nk>; | ||
//// </Button> | ||
//// </Link>; | ||
|
||
const wordPattern = "[a-zA-Z0-9:\\-\\._$]*"; | ||
|
||
const linkedCursors1 = { | ||
ranges: [{ start: test.markerByName("1").position, length: 8 }, { start: test.markerByName("4").position - 1, length: 8 }], | ||
wordPattern, | ||
}; | ||
const linkedCursors2 = { | ||
ranges: [{ start: test.markerByName("6").position, length: 14 }, { start: test.markerByName("9").position - 6, length: 14 }], | ||
wordPattern, | ||
}; | ||
const linkedCursors3 = { | ||
ranges: [{ start: test.markerByName("10").position, length: 4 }, { start: test.markerByName("15").position - 2, length: 4 }], | ||
wordPattern, | ||
}; | ||
const linkedCursors4 = { | ||
ranges: [{ start: test.markerByName("12").position, length: 6 }, { start: test.markerByName("14").position - 3, length: 6 }], | ||
wordPattern, | ||
}; | ||
|
||
verify.linkedEditing( { | ||
"1": linkedCursors1, | ||
"2": linkedCursors1, | ||
"3": linkedCursors1, | ||
"4": linkedCursors1, | ||
"5": linkedCursors1, | ||
"6": linkedCursors2, | ||
"7": linkedCursors2, | ||
"8": linkedCursors2, | ||
"9": linkedCursors2, | ||
"10": linkedCursors3, | ||
"11": linkedCursors3, | ||
"12": linkedCursors4, | ||
"13": linkedCursors4, | ||
"14": linkedCursors4, | ||
"15": linkedCursors3, | ||
}); | ||
verify.baselineLinkedEditing(); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.