-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It would be nice to support using single quotes instead of double quotes to surround attribute values.
For example, if I put a JSON string in an attribute, the render result can be filled with "s:
<!-- total: 1826 bytes; `"`s: 888 bytes (~48.63% of total). -->
<x-foo-table class="x h-full" foos="[{"id":379338656,"name":"******","type":"general","createdAt":"2025-08-08T20:17:39.663373Z","note":"test"},{"id":141015513,"name":"******","type":"general","createdAt":"2025-08-08T21:59:38.912249Z"},{"id":158390610,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:01:50.388961Z"},{"id":394389570,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:01:55.365973Z"},{"id":974399273,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:05:20.970877Z"},{"id":17757763,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:05:22.365469Z"},{"id":1729396425,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:05:23.820177Z"},{"id":1392435214,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:05:25.439Z"},{"id":1338106766,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:01:56.884257Z","note":"x"},{"id":1689333865,"name":"******","type":"creation_dedicated","createdAt":"2025-08-09T07:52:19.403957Z"}]"></x-foo-table>If I switch to using single quotes, the result is much clearer:
<!-- total: 1086 bytes. -->
<x-foo-table class='x h-full' foos='[{"id":379338656,"name":"******","type":"general","createdAt":"2025-08-08T20:17:39.663373Z","note":"test"},{"id":141015513,"name":"******","type":"general","createdAt":"2025-08-08T21:59:38.912249Z"},{"id":158390610,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:01:50.388961Z"},{"id":394389570,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:01:55.365973Z"},{"id":974399273,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:05:20.970877Z"},{"id":17757763,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:05:22.365469Z"},{"id":1729396425,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:05:23.820177Z"},{"id":1392435214,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:05:25.439Z"},{"id":1338106766,"name":"******","type":"creation_dedicated","createdAt":"2025-08-08T22:01:56.884257Z","note":"x"},{"id":1689333865,"name":"******","type":"creation_dedicated","createdAt":"2025-08-09T07:52:19.403957Z"}]'></x-foo-table>Maybe this behavior can be enabled with a new feature flag like single-quoted-attributes.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request