-
-
Notifications
You must be signed in to change notification settings - Fork 200
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Following on from #1104, which noted that $foo is converted to $['foo'] regardless of whether or not it exists within a string literal, I’m wondering whether the regex pattern used in statementRe could be applied here too, to prevent this from happening.
datastar/library/src/engine/engine.ts
Lines 329 to 330 in 421724a
| const statementRe = | |
| /(\/(\\\/|[^/])*\/|"(\\"|[^"])*"|'(\\'|[^'])*'|`(\\`|[^`])*`|\(\s*((function)\s*\(\s*\)|(\(\s*\))\s*=>)\s*(?:\{[\s\S]*?\}|[^;){]*)\s*\)\s*\(\s*\)|[^;])+/gm |
Such a task requires an elite team. I put forward:
- @andersmurphy, who wrote the regex for
statementRe. - @yurivish, who reported the issue and a no-op
replace. - @gazpachoking, who has made excellent contributions to the project.
If any of you are interested, let me know so I can get you latest WIP version.
Datastar Version
v1.0.0-RC.6
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request