Closed xeonicca closed 3 years ago
Yeah that doesn't look right, might be a regex issue in posthtml-expressions
.
So this is actually not a bug in posthtml-expressions
, but a side effect of how it's used in Maizzle.
{{ }}
expressions are parsed basically twice when using components: once for the component, and once for the resulting HTML when the component has been rendered in the layout.
It works with @@{{ }}
because:
@{{ var }}
{{ var }}
Whereas if you only use @{{ }}
:
{{ var }}
undefined
// expression from first pass is parsedThis is now added to the Component docs.
Hello, first of all thank you for building maizzle; it made email creation so much easier.
I want to report something that is not necessarily a bug but not mentioned in the documentations. WIth the default setup (from
maizzle new
, I created a button component in which I would like to pass two variables to it:buttonText
andbuttonLink
The component HTML looks like this
and the HTML where I use this component looks like this
The expected output should be
However I am getting
Clearly I cant use the
raw
tag inside HTML attributes, so after messing with the syntax for few hours, I found the following worksI have not seen this behavior documented in Escaping and I am not even sure if this is expected, perhaps you could share some insights?