Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TwigComponent] allow attributes to be prefixed with @ #1960

Merged
merged 1 commit into from
Jul 6, 2024

Conversation

kbond
Copy link
Member

@kbond kbond commented Jul 4, 2024

Q A
Bug fix? yes
New feature? no
Issues Fix (partial) #1839
License MIT

Allow attributes to be prefixed with @ (like @click="!open").

@kbond kbond changed the title fix: allow attributes to be prefixed with @ [TwigComponent] allow attributes to be prefixed with @ Jul 4, 2024
@kbond
Copy link
Member Author

kbond commented Jul 4, 2024

Currently, this PR only adds a failing test demonstrating the problem reported in #1839. I could use some help to fix!

@kbond kbond marked this pull request as ready for review July 4, 2024 17:52
@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Jul 4, 2024
@smnandre
Copy link
Member

smnandre commented Jul 4, 2024

In TwigPreLexer , i guess consumeAttributeName should use another regexp than the one in consumeComponentName

But we need a lot of tests for this, as they cannot be class props !

@kbond kbond force-pushed the bug/ampersand-in-attribute-name branch from c44c989 to c567cbb Compare July 6, 2024 16:43
@kbond kbond merged commit bdb5bc3 into symfony:2.x Jul 6, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants