-
Notifications
You must be signed in to change notification settings - Fork 225
Allow optional quotes around tag helper directives #647
Conversation
@@ -285,7 +289,7 @@ protected void BaseTypeDirective(string noTypeNameError, Func<string, SpanChunkG | |||
Output(SpanKind.Code, AcceptedCharacters.AnyExceptNewline); | |||
} | |||
|
|||
private void TagHelperDirective(string keyword, ISpanChunkGenerator chunkGenerator) | |||
private void TagHelperDirective(string keyword, Func<string, ISpanChunkGenerator> chunkGeneratorThunk) |
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.
chunkGeneratorThunk
? lol wha name is that
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.
Such an awesome name. I can change it to chunkGeneratorFactory
if that's the more common term in the codebase.
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.
Por favor 😄
You're missing a piece in this PR. The line mappings of the during design time will be off for |
⌚ |
Updated |
1 similar comment
Updated |
@@ -1,5 +1,5 @@ | |||
@addTagHelper something, nice | |||
@removeTagHelper doesntmatter, nice | |||
@addTagHelper "something, nice" |
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.
Do this for a few of the design time code generation tests so we can validate line mappings. Should be one for each, add, remove, prefix
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.
ok.
⌚ for line mapping tests. |
d1e8614
to
53a4a7b
Compare
Updated |
@@ -0,0 +1,10 @@ | |||
@tagHelperPrefix THS |
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.
Whaaa, nononononono. I was saying that you could just intermingle quotes/non-quotes in existing tests that have design-time tests for them already. Same with below. These things don't deserve their own dedicated tests
53a4a7b
to
e1244f6
Compare
Updated |
@@ -98,6 +99,8 @@ private void VisitTagHelperDirectiveChunk(string text, Chunk chunk) | |||
Writer.WriteVariableDeclaration("string", TagHelperDirectiveSyntaxHelper, "null"); | |||
} | |||
|
|||
var text = ((Span)chunk.Association).Content.Trim(); |
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.
This doesn't work does it? What happens if the content has quotes? Wont the values come out double quoted?
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.
The old code added quotes back. What should this be doing?
⌚ |
e1244f6
to
3c00a3a
Compare
3c00a3a
to
e1aa888
Compare
Fixes #636