-
Notifications
You must be signed in to change notification settings - Fork 7
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
Allow top-level text nodes in whitespace braces #231
Comments
Adding HTML inside expression blocks is slightly problematic. From what I can tell, there are only two options: Option 1: Force wrapping an HTML around the content:
Option 2: Using an HTML string
The problem with option 1 is that it forces authors to wrap the content inside a new element. This can lead to potential issues such as:
One solution would be to use the new wraping symbols to define ANY HTML content - regardless of whether it is a block or a string.
|
Agree. Although it was my idea, I am concerned about reusing |
I'm... not sure. I definitely agree that adding the extraneous tags is the wrong option (eg. https://github.com/ambiata/bikeshed/blob/d195f2942cfe1614e5598883e2c8219d9908345a/modules/general/tooltip/template.prj#L11), and that we should at least be using Our weird projector language rules are:
I think it's number 4 that's causing the weird "where am I?" / "what can I type here?" disjoint feeling. You have regular text which is fine in some spots, and wrong in others. BUT, it's incredibly convenient. I'm not sure what the fix is, but this {| ... |} feels like a bandaid. :S |
Agreed about not re-using And either way, this would leave us with five special brackets:
|
There's no other fix short of mandatory HTML brackets around all HTML blocks, which we almost certainly don't want.
|
IRL chat result: we're deferring this for a week while we convert templates, to figure out common annoying patterns. |
It's pretty annoying to need to do
{{ "foo" }}
to produce a text node from a string literal, and likewise it can be hard to tell when exactly you're writing HTML vs an expression. Might make sense to allow{|foo|}
, with{||}
always implying HTML mode.Suggestion from Russ
The text was updated successfully, but these errors were encountered: