-
Notifications
You must be signed in to change notification settings - Fork 15
Description
hello the syntax highlighter is a life saver! but i noticed various issue if inside the markup i add some nested if and else like this
@change="
if ($event.target.checked) {
if (!formData[formGroup.id][element.id]) {
formData[formGroup.id][element.id] = [];
}
formData[formGroup.id][element.id].push(option.value);
} else {
formData[formGroup.id][element.id] = formData[formGroup.id][element.id].filter(val => val !== option.value);
}
"
it affect the rest of the lines changing color and highlight not closed tag( but they are closed)
while the same but less readable statement in ternary operator
@change="
formData[formGroup.id][element.id] = $event.target.checked
? [...(formData[formGroup.id][element.id] || []), option.value]
: formData[formGroup.id][element.id].filter(val => val !== option.value);
"
doesn't affect the whole highlighting