Currently, Pug syntax embedded in Svelte template tags requires quoted values, enclosing Javascript expressions in braces:
body
p(class:name!="{highlighted}") Example
This isn't a Pug requirement. The following Pug syntax would be fine:
body
p(class:name={highlighted} Example
Aren't the braces enough to delineate Javascript snippets?
In Svelte 6, I understand that quoted attribute will be stringified. So, the way Svelte interprets the HTML equivalent of the previous two examples will be different.
What is the reason that the quotes are currently required? Can we remove that requirement in svelte-preprocess?
Currently, Pug syntax embedded in Svelte template tags requires quoted values, enclosing Javascript expressions in braces:
This isn't a Pug requirement. The following Pug syntax would be fine:
Aren't the braces enough to delineate Javascript snippets?
In Svelte 6, I understand that quoted attribute will be stringified. So, the way Svelte interprets the HTML equivalent of the previous two examples will be different.
What is the reason that the quotes are currently required? Can we remove that requirement in svelte-preprocess?