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

Converter doesn't handle non-standard HTML attributes #284

Open
marcoroth opened this issue Feb 5, 2024 · 0 comments · May be fixed by #288
Open

Converter doesn't handle non-standard HTML attributes #284

marcoroth opened this issue Feb 5, 2024 · 0 comments · May be fixed by #288

Comments

@marcoroth
Copy link
Owner

ERB Input:

<button @click.prevent="something">Button</button>

Output:

class ButtonComponent < Phlex::HTML
def template
button(click.: true, prevent: %(something)) { %(Button)
 }
end
end

Expected output:

class ButtonComponent < Phlex::HTML
 def template
    button("@click.prevent": %(something)) { %(Button) }
  end
end

@adamlogic experienced this in the GoRails Phlex episode: https://youtu.be/l4bQSfqZZfQ&t=975

@marcoroth marcoroth linked a pull request Feb 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant