It would be great if the the Hamlet parser could recognize and preserve multi-line string attribute values.
In my case, I’m trying to use Alpine.js’s x-data with a complex state, but am forced to cram everything onto one line or split into unreadable concatenations.
See their example at on their getting started guide:
<div
x-data="{
search: '',
items: ['foo', 'bar', 'baz'],
get filteredItems() {
return this.items.filter(
i => i.startsWith(this.search)
)
}
}"
>
<input x-model="search" placeholder="Search...">
<ul>
<template x-for="item in filteredItems" :key="item">
<li x-text="item"></li>
</template>
</ul>
</div>
Currently the parser fails as it doesn't expect a EOL in an attribute value.
It would be great if the the Hamlet parser could recognize and preserve multi-line string attribute values.
In my case, I’m trying to use Alpine.js’s x-data with a complex state, but am forced to cram everything onto one line or split into unreadable concatenations.
See their example at on their getting started guide:
Currently the parser fails as it doesn't expect a EOL in an attribute value.