You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In Vue components, a string literal inside a directive value keeps its character references (@click="msg = 'Tom & Jerry'") #313
In a component that uses Vue, a string literal written inside a directive value keeps its character references as typed, while Vue decodes them. For example:
<button @click="msg = 'Tom & Jerry'">Set</button>
sets msg to Tom & Jerry; Vue's own compiler (@vue/compiler-dom 3.5.44) sets Tom & Jerry. The raw ; of the reference also makes Citry treat the handler as a statement block. The same happens in v-if, v-show, v-for, v-slot, v-model, v-text, v-memo and custom directive values.
Cause
Citry's patched Vize emitter (third_party/rust/vize_s1_to_s2/src/emit) reads these directive values as raw text (prefix::node_content), without the attribute-value decoding Vue applies to them.
Fix direction
Decode directive values by the attribute-value rule before they are parsed as JavaScript, as Vue does, for every directive kind, and decide whether a handler is a statement block from the decoded value.
Activity