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

Add support for single quoted attrs #144

Merged
merged 1 commit into from
Aug 7, 2024
Merged

Conversation

goring
Copy link
Contributor

@goring goring commented Aug 7, 2024

Now able to use single quotes as attribute values.

Div(attrs.Props{
    "data-values": `'{"quantity": 5}'`,
})

Previous output

<div data-values="'{" quantity": 5}'"></div>

New HTML output

<div data-values='{"quantity": 5}'></div>

Rendered by the browser

<div data-values="{"quantity": 5}"></div>

Copy link
Owner

@chasefleming chasefleming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for adding this!

@chasefleming chasefleming merged commit d709650 into chasefleming:main Aug 7, 2024
1 check passed
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 this pull request may close these issues.

2 participants