Comments (4)
I wonder if there is something we can do to communicate this to affected users? It could be surprising for the contents of the curly braces to be printed as children rather than interpolated.
I've also noted in this example that we don't stop a user from calling a component with children, even if the children are never rendered. One to think about!
from templ.
@joerdav - looks like we have ambiguous grammar here.
@Test() { // Children of "@Test()" }
@Test() { "string to output" }
Ideas?
from templ.
@a-h one potentially breaking option would be to disallow block elements on a single line? Make a new line after {
and before }
a requirement. Otherwise it will be detected as interpolation?
from templ.
Sounds like a sensible plan of action to me.
from templ.
Related Issues (20)
- Anyway to instantiate a templ once per rendering context? HOT 4
- performance: templ parse takes a long time and uses high CPU when unclosed void elements are used HOT 8
- Little typo in streaming documentation
- bug: `templ generate --watch --proxy` triggers 2 browser reload events HOT 1
- bug: go to definition causes error in Neovim v0.10.x HOT 11
- LSP - gopls command error HOT 3
- bug: ComponentScript rendered even when 'if condition' fails HOT 1
- GoToDef .Templ templ() instead of .go func () HOT 2
- bug(lsp): diagnostics error on Windows due to URI encoding HOT 1
- If you write the class attribute 2 times, the second one is silently discarded HOT 1
- bug: discrepancy between buffers in `runtime.go` and `runtime/bufferpool.go` HOT 3
- `templ generate` is loading my layout into styles.css HOT 5
- documentation: templ.SafeURL is not working as described HOT 2
- Setting children from go code HOT 2
- Neovim/Template goto definition returns error: index out of range HOT 8
- proposal: render individual template fragments
- Taking too much memory with (relatively) larger files HOT 3
- Switch fallthrough not supported
- Suggestion when convert golang template to a-h/templ HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templ.