-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Css args #484
Css args #484
Conversation
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.
Brilliant. Nice to see this long requested feature implemented.
I'm happy to see the new Go parser paying off too. 😀
@@ -28,7 +28,7 @@ var templateExpressionParser = parse.Func(func(pi *parse.Input) (r templateExpre | |||
// templ (x []string) Test() { | |||
// becomes: | |||
// func (x []string) Test() templ.Component { | |||
if r.Expression, err = parseGoFuncDecl(pi); err != nil { | |||
if _, r.Expression, err = parseTemplFuncDecl(pi); err != nil { |
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.
I wonder if there's some debug value in the name of the templ, it could be passed down the context.
For example, the context could identify slow rendering components, or could print out a series of names: Page > Body > content > heading
.
Not important, or that you need to do anything with this PR. Its just that your change sparked ideas. 😀
Looks very nice! The example in the documentation showcases an integer parameter, does it also handle strings? Like for example background url('{ myVar }'). If so, what kind of escaping is used? |
It looks exactly the way I need it to look! 👍 @a-h when are you planning to release this? |
Plan to release tomorrow. |
Fixes #88