-
Notifications
You must be signed in to change notification settings - Fork 229
Correctly stitch @ characters to following identifiers when rewriting tag helpers
#10331
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
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
3 changes: 1 addition & 2 deletions
3
...ests/TagHelperBlockRewriterTest/CreatesErrorForEmptyTagHelperBoundAttributes13.cspans.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 |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| Code span at (13:0,13 [4] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [9] ) | ||
| Code span at (17:0,17 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [5] ) | ||
| Code span at (18:0,18 [4] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [5] ) | ||
| Code span at (17:0,17 [5] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [5] ) | ||
| Code span at (22:0,22 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [11] ) |
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
3 changes: 1 addition & 2 deletions
3
...HelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes4.cspans.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 |
|---|---|---|
| @@ -1,3 +1,2 @@ | ||
| Code span at (13:0,13 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [19] ) | ||
| Code span at (14:0,14 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (14:0,14 [18] ) | ||
| Code span at (15:0,15 [17] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (14:0,14 [18] ) | ||
| Code span at (14:0,14 [18] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (14:0,14 [18] ) |
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
9 changes: 3 additions & 6 deletions
9
...HelperBlockRewriterTest/CreatesMarkupCodeSpansForNonStringTagHelperAttributes7.cspans.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 |
|---|---|---|
| @@ -1,18 +1,15 @@ | ||
| Code span at (13:0,13 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [14] ) | ||
| Code span at (14:0,14 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [14] ) | ||
| Code span at (16:0,16 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (16:0,16 [7] ) | ||
| Code span at (17:0,17 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [6] ) | ||
| Code span at (18:0,18 [5] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [6] ) | ||
| Code span at (17:0,17 [6] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (17:0,17 [6] ) | ||
| Code span at (23:0,23 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [14] ) | ||
| Code span at (25:0,25 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (13:0,13 [14] ) | ||
| Code span at (39:0,39 [6] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (39:0,39 [46] ) | ||
| Code span at (45:0,45 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (45:0,45 [11] ) | ||
| Code span at (46:0,46 [10] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (45:0,45 [11] ) | ||
| Code span at (45:0,45 [11] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (45:0,45 [11] ) | ||
| Code span at (56:0,56 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (39:0,39 [46] ) | ||
| Code span at (58:0,58 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (58:0,58 [3] ) | ||
| Code span at (60:0,60 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (58:0,58 [3] ) | ||
| Code span at (61:0,61 [8] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (39:0,39 [46] ) | ||
| Code span at (69:0,69 [2] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (39:0,39 [46] ) | ||
| Code span at (71:0,71 [1] ) (Accepts:AnyExceptNewline) - Parent: Markup block at (71:0,71 [14] ) | ||
| Code span at (72:0,72 [1] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (72:0,72 [13] ) | ||
| Code span at (73:0,73 [12] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (72:0,72 [13] ) | ||
| Code span at (72:0,72 [13] ) (Accepts:AnyExceptNewline) - Parent: Expression block at (72:0,72 [13] ) |
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
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
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
6 changes: 6 additions & 0 deletions
6
...ge/test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml
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,6 @@ | ||
| @addTagHelper "*, TestAssembly" | ||
|
|
||
| @{ | ||
| var count = "1"; | ||
| } | ||
| <input age="Convert.ToInt32(@count)" /> |
55 changes: 55 additions & 0 deletions
55
...es/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier_DesignTime.codegen.cs
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,55 @@ | ||
| // <auto-generated/> | ||
| #pragma warning disable 1591 | ||
| namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles | ||
| { | ||
| #line hidden | ||
| public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EscapedIdentifier_DesignTime | ||
| { | ||
| #line hidden | ||
| #pragma warning disable 0649 | ||
| private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext; | ||
| #pragma warning restore 0649 | ||
| private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); | ||
| private global::InputTagHelper __InputTagHelper; | ||
| #pragma warning disable 219 | ||
| private void __RazorDirectiveTokenHelpers__() { | ||
| ((global::System.Action)(() => { | ||
| #nullable restore | ||
| #line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml" | ||
| global::System.Object __typeHelper = "*, TestAssembly"; | ||
|
|
||
| #line default | ||
| #line hidden | ||
| #nullable disable | ||
| } | ||
| ))(); | ||
| } | ||
| #pragma warning restore 219 | ||
| #pragma warning disable 0414 | ||
| private static object __o = null; | ||
| #pragma warning restore 0414 | ||
| #pragma warning disable 1998 | ||
| public async System.Threading.Tasks.Task ExecuteAsync() | ||
| { | ||
| #nullable restore | ||
| #line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml" | ||
|
|
||
| var count = "1"; | ||
|
|
||
| #line default | ||
| #line hidden | ||
| #nullable disable | ||
| __InputTagHelper = CreateTagHelper<global::InputTagHelper>(); | ||
| #nullable restore | ||
| #line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml" | ||
| __InputTagHelper.AgeProp = Convert.ToInt32(@count); | ||
|
|
||
| #line default | ||
| #line hidden | ||
| #nullable disable | ||
| await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); | ||
| } | ||
| #pragma warning restore 1998 | ||
| } | ||
| } | ||
| #pragma warning restore 1591 |
6 changes: 6 additions & 0 deletions
6
.../IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier_DesignTime.codegen.html
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,6 @@ | ||
| ~~~~~~~~~~~~~ ~~~ ~~~~~~~~~~~~~ | ||
|
|
||
| ~~ | ||
| ~~~ ~~~~~ ~ ~~~~ | ||
| ~ | ||
| <input age="~~~~~~~~~~~~~~~~~~~~~~~" /> |
28 changes: 28 additions & 0 deletions
28
...grationTests/CodeGenerationIntegrationTest/EscapedIdentifier_DesignTime.html.mappings.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,28 @@ | ||
| Source Location: (13:0,13 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml) | ||
| | | | ||
| Generated Location: (13:0,13 [1] ) | ||
| | | | ||
|
|
||
| Source Location: (31:0,31 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml) | ||
| | | ||
|
|
||
| | | ||
| Generated Location: (31:0,31 [4] ) | ||
| | | ||
|
|
||
| | | ||
|
|
||
| Source Location: (62:4,1 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml) | ||
| | | ||
| <input age="| | ||
| Generated Location: (62:4,1 [14] ) | ||
| | | ||
| <input age="| | ||
|
|
||
| Source Location: (99:5,35 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml) | ||
| |" /> | ||
| | | ||
| Generated Location: (99:5,35 [6] ) | ||
| |" /> | ||
| | | ||
|
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we had been validating C# diagnostics, this would have been caught before FUSE was merged. More priority to #10247.