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

Multi-line attributes are not supported #115

Closed
joerdav opened this issue Jul 26, 2023 · 1 comment · Fixed by #124
Closed

Multi-line attributes are not supported #115

joerdav opened this issue Jul 26, 2023 · 1 comment · Fixed by #124

Comments

@joerdav
Copy link
Collaborator

joerdav commented Jul 26, 2023

Brought to my attention by @c-nv-s in the HTMX discord.

When writing hyperscript it is common to have an attribute with multiple lines, such as:

data-script="on click
                do something
             end"

In this case an error is returned "string literal not terminated"

@joerdav
Copy link
Collaborator Author

joerdav commented Jul 28, 2023

A workaround for this for now would be to use a go string literal:

data-script={`on click
                do something
             end`}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant